I’m offsetting planes with a custom vertex shader using elevation maps (basically bump maps). For them to cast shadows on themselves (through a directional light source), I’ve been using a customDepthMaterial that uses the same elevation maps. Worked like a charm:
Since three.r132 however, the shadows stopped working. I digged through the changelog in r132 and found nothing of help. Beside minor changes in the customDepthMaterial shader:
added #include <normal_pars_fragment>
added #include <output_fragment>
… there was nothing required to get the app running again, but the shadows are gone:
Until r131, I offsetted the terrain in the vertex shader and used a customDepthMaterial to allow self-shadowing. since r132, this stopped working, unfortunately
Thing is: Basic shadowing is rather easy, it really depends on how you’re creating your terrain. If it is offsetted on the CPU, any out of the box shadowing should work (there are many (!) tutorials, examples, etc.). If it happens in the vertex shader, things start to get tricky …