Following the examples in the documentation, http://unity3d.com/support/documentation/Components/SL-SurfaceShaderExamples.html, specifically the Normal Extrusion with Vertex Modifier example with…
void vert (inout appdata_full v) {
v.vertex.xyz += v.normal * _Amount;
}
The vertex shader works fine, but it’s only applied AFTER the realtime shadows are calculated. Since the vertex positions are pretty important to the shadow calculation, you get pretty bad mismatch between where the shadows are and where they should be.
So I’m wondering, where can I insert the vertex shader such that it affects the shadow passes as well?
- Chad