Render Que Issue With VFX

I’m having an issue with a cylinder effect with a texture on it rendering the texture behind its self from a certain angle. On one side it looks the way I want it to shown in the first screenshot. on the other side it appears layered incorrectly. I’m using a particle fade shader currently. I’m not sure what shader I should be using for this. I’m not very familiar with shaders or render Que. The effect is layered correctly when I use the cut out shader but then there is no transparency and SSAO is applied to it making it look dark…

If anyone has any ideas on how to make it layered correctly from all angles that would be very helpful. Thanks in advanced.



6926693--812858--ShaderImage.png

Correct and efficient sorting of real time transparency is an unsolved problem.

When rendering opaque meshes, they can use the depth buffer to ensure they’re correctly sorted in the final image regardless of the order they draw in.

When rendering a single transparent mesh, the order of the triangles in the mesh data determines the order they draw, and as a result determines which one appears over another. You can’t use the depth buffer because it can only hold one depth value per pixel, and you can’t render something between two things that have already been rendered. It only work for opaque objects because you’re only ever skipping rendering of an pixel, or replacing the value that was already there. So when rendering transparent objects, each mesh, and each triangle of that mesh, are rendered one after another over whatever rendered before it.

If you have a two sided shader on a cylinder mesh, it’s impossible to ensure the triangles are going to be in an order means they look correct from any direction. And it’s expensive and slow to sort them even if that was an option, which it’s not here.

But there is a solution, at least for this case. Don’t use a two sided material. Use doubled geometry with a single sided material.

The idea would be to take your existing mesh, duplicate it, and flip the faces. Then you need to make sure the cylinder with faces pointed in is rendered first by being the first triangles listed in the mesh. Most of the time this can be done by having the two cylinders be separate objects in your modeling tool and adding the outward facing mesh to the inside facing mesh.

1 Like

Wow that was an excellent and very detailed answer. I will try that first thing tomorrow! I appreciate the help!