Using greater test for depth

Hello!

Is there a way to change the depth test function to greater? I want to simply render a hidden object with a specific color.

Thanks,
Gustav

set the blendmode to anything but opaque or masked and disable the depth test. it will always render, and behind anything.

if you need specific control a custom depth write is the way to go, i guess. not sure how that works tho. the disable “hack” is native old school rendering.

Hello,

This is similar to what I am looking for but not quite.

I want to only want the pixels to pass the depth test where the default material doesn’t, not to have them always render. You could go through the whole process of writing custom depth and run some kind of post effect on that. It seems over the top considering the effect could probably be achieved using backface culling and shading pixels if they are occluded.

It would probably need to be a translucent pass though, to have it render after all opaque geometry.

Thanks,
Gustav

For clarity, this is the effect I am trying to achieve without having to setup a post effect and spend precious GPU cycles on every pixel when rasterization would suffice.

Thanks,
Gustav