mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +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))
|
||||
{
|
||||
ReflectVectorOptionally(light.Position);
|
||||
ReflectVectorOptionally(light.Direction);
|
||||
light.Hash = 0;
|
||||
auto reflectedLight = light;
|
||||
reflectedLight.Position = Vector3::Transform(light.Position, mirror.ReflectionMatrix);
|
||||
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