I’m trying to get translucent particle shaders to show in front of everything else (well, maybe not GUI elements).
I’ve tried searching for the solution and the techniques aren’t working.
I started by trying to modify the built in shaders, and have tried:
ZTest Always
“Queue”=“Overlay”
“Queue”=“Overlay+1”
“Queue”=“Geometry”
“Queue”=“Geometry+1”
And none of these seem to even change anything, let alone work.
At the moment, I’m trying to use them as targeting and selection indicators if that makes a difference.
I’m using particles, because they seemed to be a cheap and easy way to do this. They always face the camera, and take minimal resources.
It should. If it’s not then something else is broken. Try posting the entire shader here so we can see if something else is wrong. You might also try making a new material with the shader and see if it still has the issue. I believe there’s a bug with materials overriding their shader’s queue in some situations.
My internet is down from the computer, but there’s nothing really to post.
It’s simply a built-in shader with the two changes you suggested:
“Particles/Additive (Soft)”
I changed Queue from “Transparent” to “Overlay”
Then added ZTest Always under Tags.
Also tried this with another shader:
“Particles/Alpha Blended”
Yes, it’s just because you’re using the particle shaders as your base. They do the initial z test to reject areas to draw in the fragment shader and then do an additional test against the depth buffer in the fragment shader to do soft intersections. If you just delete all of the shader between the #ifdef SOFTPARTICLES_ON and #endif (and those # lines) it’ll not do the work for soft particles and thus not get hidden.