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's currently possible to automatically create a signed distance field (SDF) in 2D by using LightOccluder2Ds and their sdf_collider property. The SDF can be used in custom shaders and for particle collisions.
This works well, but it has the downside of all occluders being part of the same SDF. This can make it impossible to use with multiple shaders or particle collisions that should only apply to a some occluders.
As an example I have a project where I use the SDF to cast drop shadows (as seen in #43886) and for particle collision with solid objects. I now have some 'glass' objects that should not cast a shadow but which should 'stop' particles. As it is currently, this is not possible with the built in SDF.
I'm wondering if it would be possible to create separate SDFs based on, e.g., the occluders' light mask. I have no idea if this is technically feasible, but it would make SDFs more versatile.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It's currently possible to automatically create a signed distance field (SDF) in 2D by using
LightOccluder2D
s and theirsdf_collider
property. The SDF can be used in custom shaders and for particle collisions.This works well, but it has the downside of all occluders being part of the same SDF. This can make it impossible to use with multiple shaders or particle collisions that should only apply to a some occluders.
As an example I have a project where I use the SDF to cast drop shadows (as seen in #43886) and for particle collision with solid objects. I now have some 'glass' objects that should not cast a shadow but which should 'stop' particles. As it is currently, this is not possible with the built in SDF.
I'm wondering if it would be possible to create separate SDFs based on, e.g., the occluders' light mask. I have no idea if this is technically feasible, but it would make SDFs more versatile.
Beta Was this translation helpful? Give feedback.
All reactions