Jump to content
  • Advertisement
Sign in to follow this  
Starfox

Antialiasing blitting problem

This topic is 2704 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

I have a rendering pipeline that goes:
Render to MSAA Renderbuffer -> blit to screen
I'm trying to change it to:
Render to MSAA Renderbuffer -> blit to Texture -> blit texture to screen

Both MSAA renderbuffer and texture are FP16. Here's how I create the texture:

glTextureImage2DEXT(ResolveTargetTexture, GL_TEXTURE_2D, 0, 4, ScreenWidth, ScreenHeight, 0, GL_RGBA, GL_HALF_FLOAT, NULL);

Now my resolve code was like this:


glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER, MultisampleFramebufferObject);
glBlitFramebufferEXT(0, 0, ScreenWidth, ScreenHeight, 0, 0, ScreenWidth, ScreenHeight, GL_COLOR_BUFFER_BIT, GL_NEAREST);

And it worked perfectly. Changing it to this:


//
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, ResolveTargetFramebufferObject);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER, MultisampleFramebufferObject);
glBlitFramebufferEXT(0, 0, ScreenWidth, ScreenHeight, 0, 0, ScreenWidth, ScreenHeight, GL_COLOR_BUFFER_BIT, GL_NEAREST);
//
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER, ResolveTargetFramebufferObject);
glBlitFramebufferEXT(0, 0, ScreenWidth, ScreenHeight, 0, 0, ScreenWidth, ScreenHeight, GL_COLOR_BUFFER_BIT, GL_NEAREST);

Results in AA anomalies - the edges seem "thicker", for lack of a better word. I thought it might be related to Gamma AA, but on my test rig (NV GTX 260M 1 GB) I checked and gamma correct AA is set to off in the control panel. What am I doing wrong? Any idea where those anomalies might be coming from?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!