I’m relatively new to shaders, but I’m trying to achieve something specific to make life a lot easier. I have a ground plane mesh which is perfectly flat (the grass), on top of which sits a flat road mesh. Ideally these need to be at the exact same level - offsetting the road is not feasible without creating more problems.
Since the ground plane is flat, it never needs to obscure anything. So I thought finding a way to force it to “always draw behind everything” would be very handy. My current attempt involves modifying a standard Diffuse shader to include the following:
Pass {
ZTest Always
Offset 1, 1
}
This has the opposite intended effect of always drawing the ground plane ON TOP of everything. Which is strange because using -1, -1 for Offset achieves the same thing, but turns the grass plane completely BLACK. Is there a way to flip this around and force the ground plane BEHIND everything?