#disable self shadow?

4 messages · Page 1 of 1 (latest)

rough zephyr
#

Is it possible to disable a mesh to self shadow, but still throw/receive shadows on other 3d objects? The standard material allows for shading to be disabled, but I dont see an option to disable only self shadow. Is there a way?

mellow relic
#

In Godot, there is no direct option in the StandardMaterial to disable only the self-shadowing while still allowing the mesh to cast and receive shadows from other objects. However, you can achieve this effect using a Custom Shader.

rough zephyr
mellow relic
#

No, you do not need to use the light() function in your shader to disable self-shadowing while still allowing the mesh to cast and receive shadows from other objects in Godot. Instead, you can achieve this by manipulating the shadowing behavior directly within the shader.

To disable self-shadowing, you would typically modify the shadow bias or use a custom shadow function. You can do this by writing a fragment shader that adjusts how shadows are applied to the object itself, while still allowing the object to cast shadows on other surfaces. The light() function in Godot handles lighting calculations, but it is not specifically required for the purpose of disabling self-shadowing. @rough zephyr