[SOLVED] How can I make the element transparent when other entities in front?

Something like the gizmo in the editor:

The directional light’s icon can still visible(and transparent) when the model is in front.
Really want to know how to implement this. :grinning:

Hi.

Do you mean z-buffer?..

http://learningwebgl.com/blog/?p=859

Oh, yes.
What is the playcanvas way to implement this? Must I use custom shader ?

You could disable depth test on the desired transparent material.

If I disable depth test, I can’t make the following effect, right ?

Well that particular effect might be a bit more complicated. Disabling depth test should just show your model in front of everything.

That effect uses multiple materials the details of which I’m gonna have to look up later.

1 Like

Oh, I know how to implement this.
Just two entity, one enable depth test, another disable depth test, and then set the opacity. :smile:

3 Likes