Hello everyone! For the last couple days I have been trying to create moving cloud shadows in my 3d game. Right now I have a plain mesh with a scrolling and evolving 2d noise texture hovering above my world that casts shadows based on a threshold value for alpha_scissor_cutoff. However I would like for these cloud shadows specifically to have a different opacity with a select number of bands based on the noise texture (see the picture below for the style im trying to recreate). Im not sure if i should do something in the light or fragment function and how to change/fake the shadow opacity. Any help is greatly appreciated! :)
Yeah you’re right! I already have a normal toon shader for objects in the world that works that way so the stepping is no problem. Im just not sure in the above shader what i should access to change the opacity.
Thanks a lot ! The texture itself now looks way better! But how do I get the texture to work like a shadow now? You can see my setup in the image: if I don’t use ALPHA_SCISSOR_THRESHOLD then there are no shadows at all right now.
I think Godot only supports 1-bit shadow maps for dynamic lights/shadows, you may need to take another approach than physically lighting the texture. Maybe you can use a shader on your map or the mesh quad to overlay the clouds as a fake shadow? A spotlight could project a multi-color noise texture, but not a shader so you’d have to animate the noise or spotlight seperately.
There is some talk on a open issue about semi-transparent objects casting shadows, but then alpha-hash would get you a similar but worse effect.