Glow renders over everything

+1 for the test case.

Some input: this issue looks to be happening on anything in the Transparent bucket with blend mode alpha. You can sort of fix the issue in the test case by setting GlowColor to ColorRGBA.Black on the particle material [java]sparkMat.setColor(“GlowColor”, ColorRGBA.Black);[/java]

If I had to guess, I would say the issue is coming from Common/MatDefs/Light/Glow.frag which defaults back to vec4(0.0) when there is no glow color or texture, which doesn’t write anything to the color buffer… since the transparent bucket is rendered separately, it’s depths have no effect on the rendering of the opaque bucket, and since there is no colour being written to the buffer on the extract glow pass (using the Glow technique) to ‘over write’, these objects/materials are getting ignored in the glow filter. This would explain why setting GlowColour to ColorRGBA.Black ( vec4(0.0,0.0,0.0,1.0) ).

2 Likes