Sign in to follow this  

Pixel over pixel....how?

This topic is 2835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey. I'm trying to draw some pixels in the same location and position as some preexisting pixels. I want the new pixels to completely overwrite the old pixels. I've got alpha blending, alpha testing, and depthbufferwriteenable disabled, but the pixels are still "fighting" with each other depending on my camera location. How can I make the last drawn pixel overwrite the existing pixel completely? Thanks

Share this post


Link to post
Share on other sites

Hi,

I assume that depth buffer comparison are also disabled?
There shouldn't be any fighting when depth buffer writes and comparisons are disabled.

Best regards

Share this post


Link to post
Share on other sites
Quote:
I've got alpha blending, alpha testing, and depthbufferwriteenable disabled

Just to make sure, check the result of your D3DDevice::Clear() method. Also as kauna said, if I were you I'd not only disable z-writing but z-testing too, at least when rendering the thing that needs to be "over". So in addition to D3DRS_ZWRITEENABLE, also switch off D3DRS_ZENABLE.

But if pixels are "fighting" that might indicate render states are ok, but something is wrong with z-values of polygons you are rendering. I had a similar problem which was caused by my near projection plane being set to 0.f. You can't do this, it messes up the projection matrix, so in this case set it to 1.f or at the very least 0.1f.

Hope some of this helps.

Share this post


Link to post
Share on other sites

This topic is 2835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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