Hi, I’m using HDRP, is that possible to disable depth test and make the outline highlighter effect?
I’m pretty sure that depth test can be disabled, but googling and asking around has not turned up anything. It was suggested that you can convert your shader graph to code and add the ZTEST flag, but I couldn’t get that to work. As for outline, you can do this with a texture swap. You could also use a multiplication of a fresnel and hdr color node. If you need neon or something like that you will probably have to use post processing.
Thank you, but regarding disabling depth test, I want an object to show its silhouette behind an obstacle.
Like @ mentioned, Shader Graph currently offers no option for disabling depth test, or modifying any other render state settings directly. Unity has said it’s something on their list of things to do, but it’s not available yet, and might not even be something they’ve started working on.
The only option is to not use Shader Graph and use a vertex fragment shader. If you right click on your master node you’ll get the option to copy the generated shader code which you can paste into a file and use instead of the Shader Graph, as well as modify to meet your needs.
Oh, that’s a good work around!
In URP, you can add an Object Renderer override to your URP_Renderer.asset. Set the Override Layer Mask to a layer that you want to always render over top of everything and set Depth to Always.
@gary_beebe Is on point with this.
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.0/manual/renderer-features/how-to-custom-effect-render-objects.html
For anyone that finds / needs this in the future.