i already have a direct sunlight shader that i’m satisfied with, but i want to add shadows to it
can i raycast from the sun direction to the surface, and draw a material based on that?
should i use some other method?
i already have a direct sunlight shader that i’m satisfied with, but i want to add shadows to it
can i raycast from the sun direction to the surface, and draw a material based on that?
should i use some other method?
Yes, classic shadow mapping is one of the nicest methods
You can check out how it’s done in Lights and Shadows:
Or in the newest Defold 3D Playground with shadow mapping: