You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed on discord, tiled maps have huge Z-axis gaps between their layers, which render fine under orthographic projection, but can't properly receive light from spotlights, which operate in 3D space. Each layer gets illuminated differently because of the light cone hitting the layers differently as they get further from the light source.
I see two workarounds right now:
apply a tiny Z scaling to tiled maps, like 0.001, which puts them all in more or less the same Z position (tested and works, but Michalis says this can cause rendering problems)
use ridiculously large numbers in the spotlight's Radius and Z Translation, and a very small BeamWidth / CutoffAngle, so that the huge distances between the tiled layers no longer make any visible difference (untested)
Ideally, spotlights would "just work" same as camera in orthographic projection, which seems to ignore Z axis distances. This would also mean Attenuation should not make any difference (makes little sense in 2D games anyway).
As discussed on discord, tiled maps have huge Z-axis gaps between their layers, which render fine under orthographic projection, but can't properly receive light from spotlights, which operate in 3D space. Each layer gets illuminated differently because of the light cone hitting the layers differently as they get further from the light source.
I see two workarounds right now:
Ideally, spotlights would "just work" same as camera in orthographic projection, which seems to ignore Z axis distances. This would also mean Attenuation should not make any difference (makes little sense in 2D games anyway).