mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Spawn mirrored dynamic lights in Lara rooms too
This commit is contained in:
parent
1afa98169f
commit
8ba6a2c286
1 changed files with 2 additions and 1 deletions
|
@ -1652,7 +1652,8 @@ namespace TEN::Renderer
|
||||||
// Check if light is spawned in a mirrored room, and create reflection.
|
// Check if light is spawned in a mirrored room, and create reflection.
|
||||||
for (auto& mirror : g_Level.Mirrors)
|
for (auto& mirror : g_Level.Mirrors)
|
||||||
{
|
{
|
||||||
if (Camera.pos.RoomNumber == mirror.RoomNumber && IsPointInRoom(light.Position, mirror.RoomNumber))
|
if ((Camera.pos.RoomNumber == mirror.RoomNumber || LaraItem->RoomNumber == mirror.RoomNumber) &&
|
||||||
|
IsPointInRoom(light.Position, mirror.RoomNumber))
|
||||||
{
|
{
|
||||||
RendererLight reflectedLight = light;
|
RendererLight reflectedLight = light;
|
||||||
reflectedLight.Position = Vector3::Transform(light.Position, mirror.ReflectionMatrix);
|
reflectedLight.Position = Vector3::Transform(light.Position, mirror.ReflectionMatrix);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue