Reveal Shader : Semi transparent objects for unknown reason

Hi,

I’m making a reveal shader (the alpha switch from 0 to 1 based on a distance), it’s working quiet fine but I have some of my objects that half dissolve depending on the view.

Edit : In fact I reproduce with just an Empty Graph with surface set to Transparent… disturbing…
Edit 2 : Ok now that I narrowed the problem I found threads explaining the simpliest solution is to use opaque with alpha treshold as transparent surface has z depth sorting problems… Works for me.

For example here is a cylinder with the shader, it’s ok:
7109104--848050--RevealShaderOK.png
But If I move a bit the Camera it becomes semi visible (lighting is baked)
7109104--848053--RevealShaderKO.png
And the reveal effect is working fine when I set the distance :
7109104--848059--RevealShaderDissolve.png

Here is the shader graph :

The objects have no scripts on them, so it’s not a code side effect.

The ground uses the same shader, and it looks like from some view it is rendered in front of the cylinder while it should be behind…

I guess I don’t understand a transparent or clipping shader concept… any help please?

Thanks,
Thomas

Instead of marking something resolved, perhaps you could share the solution? If your edit 2 is the answer, it might better to just answer to your own question so that it’s obvious what the solution was.That way you could help others.

Here is the answer in case my edits confuses anyone else like Olmi :

Answer :
The problem is that I used “transparent” surface mode for the shader, and transparency has z-depth sorting problems (resulting on the ground rendered in front of the cylinders sometime). The simpliest solution (found in another thread) is to use “opaque” surface mode with alpha treshold.

1 Like