I am trying to create a vertex fog with transparent color and wrote a simple custom shader with it. everything seems to work fine accept when it comes to transparency. when I set needAlphaBlending to true, some of the meshes of my opaque models are not depth tested. that’s my observation so far. Also when I set needDepthPrePass to true. It works fine. But my particle systems are not rendering in front in that case any other solution for this problem? thanks.