Background alpha over overlays fire/presumably ignores z when background is white

I think the title and the pictures are pretty descriptive:




How can I fix this?

Thank you for taking your time to read this and hopefully for any help I can get!

Attachments

BlenderFireGrid.zip (91.2 KB)

Your glowing sphere is just really bright. If you merge it over white BG, it shows as white as expected. It is not behind the pattern, it is just not separable from it. Crank down the viewer exposure (Scene panel > Color Management > Exposure), then you will see there is nothing strange happening.

AlphaOver node has nothing to do with Z values. It does not care what is in front/behind in the scene, it simply takes RGBA values from two inputs and merges them. If you want to use Z depth pass for merge, try Z Combine.