mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-29 00:07:58 +03:00
Fixed dynamic lights
This commit is contained in:
parent
85469cb4d4
commit
14f6ab36d0
1 changed files with 5 additions and 4 deletions
|
@ -1654,11 +1654,12 @@ namespace TEN::Renderer
|
||||||
{
|
{
|
||||||
if (Camera.pos.RoomNumber == mirror.RealRoom && IsPointInRoom(light.Position, mirror.RealRoom))
|
if (Camera.pos.RoomNumber == mirror.RealRoom && IsPointInRoom(light.Position, mirror.RealRoom))
|
||||||
{
|
{
|
||||||
ReflectVectorOptionally(light.Position);
|
auto reflectedLight = light;
|
||||||
ReflectVectorOptionally(light.Direction);
|
reflectedLight.Position = Vector3::Transform(light.Position, mirror.ReflectionMatrix);
|
||||||
light.Hash = 0;
|
reflectedLight.Direction = Vector3::Transform(light.Direction, mirror.ReflectionMatrix);
|
||||||
|
reflectedLight.Hash = 0;
|
||||||
|
|
||||||
_dynamicLights[_dynamicLightList].push_back(light);
|
_dynamicLights[_dynamicLightList].push_back(reflectedLight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue