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
There's something wrong about how we are approaching lighting. I don't know if this is an issue we have always had or something new introduced by some of the more recent lighting system updates (or, more likely, a combination of the two).
Current algorithm:
Light rays are only being cast at walls that face away from the light ("back walls")
The cast light rays are then used to mask a shadow layer - only leaving shadow where there is no light
Problems:
Light rays are not hitting walls that face towards the light ("front walls"). The _getWallIntersection function is being run only using back walls, so essentially the front walls are completely ignored in lighting.
If we use the front walls in the lighting calculation, then the wall tiles themselves will appear in shadow. To fix that, we'd need to draw the lighting in a layered way. E.g. draw tilemap background layer, draw masked shadows, draw tilemap walls layer, draw lighting?
The text was updated successfully, but these errors were encountered:
There's something wrong about how we are approaching lighting. I don't know if this is an issue we have always had or something new introduced by some of the more recent lighting system updates (or, more likely, a combination of the two).
Current algorithm:
Problems:
_getWallIntersection
function is being run only using back walls, so essentially the front walls are completely ignored in lighting.The text was updated successfully, but these errors were encountered: