Sign in to follow this  
Chordogg

Additive blending problem

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this