I’m working on a surface shader that modifies the vertices, and because of this I need to use the “addshadow” directive to get nice looking lighting for these modified verts.
In this shader I’m also clipping certain pixels. Because of the addshadow directive, this creates holes in the shadows for these clipped pixels. However, I wanted to keep the shadows for them.
Without the addshadow directive the shadows behave as I want them to, but the lighting on the actual object looks very bad. When using addshadows, I get nice lighting but instead get holes.
Any way around this issue? That is - updating the lighting for moved vertices while still casting shadows for clipped pixels.