Additive blending problem

Started by
1 comment, last by Chordogg 17 years, 7 months ago
I am using additive blending (Turning on alpha blending and setting source and destination blend to 1) to render all the lights in my scene. For some reason I get a strange flicker on the screen every now and then. It doesn't happen in regular intervals, but seems to be random. And the interval between each flicker is usually pretty lengthy but every now and then there is a noticable black flicker on the screen. Anyone know of any general reasons this may happen?
Advertisement
Does this happen when you move the camera around, or it is happening even if the camera stays still? If this happens when you move the camera, i would suspect there are depth buffer precision issues.

What depth buffer are you using? 16-bit or 24-bit?
Are you transforming the vertices the same way for all passes? E.g. If you are using fixed function for the first pass (ambient) and then you are blending light contribution, by using a vertex program for the vertex transformations, then this may be the problem. Use the same mechanism for transforming vertices (either all ffp, or all vp) for all passes and see if this still happens.

Just some thoughts.

HellRaiZer
HellRaiZer
It happens even when the camera is not moving. Sometimes it takes a LONG time for it to happen. I just tested it to see if it happens when I don't move the camera, and it took at least 2 or 3 minutes for the first artifact. Also the depth buffer format is set to 24 bit. What an annoyance! I am also using all vertex shader, no fixed function pipeline. I can't imagine what the problem would be.

This topic is closed to new replies.

Advertisement