I added extra filtering on depth stencil to ensure its only drawing to grass
Problem: After my game starts and the post process shader draws the grid if i place down a building it draws the grid over top of my objects. If you look its not that the shader is being rendered beyond the object. its being perfectly printed along the geometry. Why is this happening? What am i missing?
I would guess that’s the source of your problem. The depth units need to be the same scale, and you’re rescaling them in a way that makes it unlikely for SceneDepth to ever be smaller than Custom Depth, so it will just always return A<B
If that doesn’t work you’re gonna need to explain the rest of this graph. I’m honestly baffled by what the other two branches are supposed to be doing (some kind of distance clipping?)
@Arkiras
Thank you for taking a look at it. What you’re seeing is the result of hours of frustration and bad trial and error. I’ve since taken a break and started over. Of course I figured it out within 30 minutes. My newest problem however is that this Grid is printing over ALL grass and i need it to only print on the grass thats within the game board… i tried to setting Custom Stencil = 2 on the physical grid tiles and add it to the material as a second mask in the chain, but that didn’t seem to work.
Here’s my corrected code for future viewers of the thread: