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
It looks like on our JFA pre-pass we consider any texture with an alpha greater than our threshold to be an occluder; we make no distinction if that texture comes from something with the ShadowCaster2d component on it.
In practice, this means that lighting and shadows both will only work in a world where we have a (mostly) transparent background.
In this example, I added a large "background" sprite with a gray color, and it occludes all light (whether or not it has the ShadowCaster2d component).
My hunch is that in our JFA pre-pass, we need to have some information about whether or not a given position is within a light occluder or not, instead of only relying on the alpha value (as this won't work if we have a background in play).
Alternatively, if we could create a texture that only contains entities with a ShadowCaster2d component, we could carry on using the alpha value, but I'm not 100% sure if that's possible.
Summary
When using the
ray_marching
feature, shadows are still cast from entities that do not have theShadowCaster2D
component.When using
catalinzz
, shadows are not cast.Steps to reproduce
ShadowCaster2D
components from thebasic
exampleray_marching
flagExpected behaviour
Shadows are not cast
Actual behaviour
Shadows are cast
The text was updated successfully, but these errors were encountered: