I’m probably wrong here, but thought that a 2nd pass in a surface shader would receive any modifications made in the first pass? Doesn’t seem to be the case.
For example.
- 1st pass modifies a plane mesh by scaling its vertices by 1000 using a vert function
- 2nd pass just has a surface function that sets the color to red
The result is: only the original location of the verts are colored red.
What I’m trying to do:
Create a large plane (water) that reads in the camera depth texture to draw some shore edge effects. I can’t write to the depth buffer and do this, because the depth would always be at the water. Thus creating shore everywhere. I want to draw water with depth then use a second pass to add shadows. I just need that second pass to operate on the same vertices the first pass did