Transparency and Depth Buffer

Hello!

I got stuck on the classic Transparency and Depth Buffer issue.

I setup a scene with FUSE that contains multiple entities and I need transparency for all.
I need the alpha to be smooth, not just on/off, so Alpha cutout doesn’t work for me.
Also I need my materials to be just colors with no lights in the scenes so I’m also using the emissive component for the material.

I’m attaching here a small example patch, it’s an exact replica of my bigger setup.
I also added an LFO toggling the alpha feature, showing that each time it turns on it gets a different draw order (sometimes points are on front, sometimes boxes are on front).

I tried reading this already and other threads on the forum but cannot really figure this out myself.

Do I have any way to force Entities to register in the Depth Buffer?
Any other solutions to make this work properly?

TransparencyDepthIssueExample.vl (118.0 KB)

Ok so thanks to @Noir we found a solution for my issue.

The point was not to use InstancedRenderer but rather BufferToRenderEntity.
This way I discard the PBR material pipeline, using only the color which is totally fine for my use case.
On BufferToRenderEntity I can use a BlendStateDescription node to set how to manage alpha and DepthStencilStateDescription to set depth buffer registering of entities.

Here’s the updated patch working as intended for my use case :)

TransparencyDepthIssueExample_solved.vl (100.5 KB)

2 Likes