Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Multisample quality for screen not as good as for FBO on ATI Radeon

  1. #1
    Junior Member Regular Contributor
    Join Date
    Oct 2007
    Location
    Phoenix, AZ
    Posts
    109

    Multisample quality for screen not as good as for FBO on ATI Radeon

    I am not sure if this is a card-specific thing, driver-specific or if I am doing something wrong.

    Here is the problem:
    The card (ATI Radeon HD 4300/4500 Series) does 4x multisampling. The quality of the output is lower when drawing to the screen
    http://chattypics.com/files/screen_q1oju76nc2.png
    than it is if you draw to a multisampled FBO
    http://chattypics.com/files/fbo_e4amht2pnv.png


    The problem doesn't appear on my other machine which has an NVidia card.
    But then, that card does 16x multisampling and maybe the difference there. But just isn't noticeable.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	screen.png 
Views:	82 
Size:	4.7 KB 
ID:	872   Click image for larger version. 

Name:	fbo_e4amht2pnv.png 
Views:	80 
Size:	3.4 KB 
ID:	873  
    Last edited by CRasterImage; 09-17-2012 at 12:54 PM.

  2. #2

  3. #3
    Junior Member Regular Contributor
    Join Date
    Oct 2007
    Location
    Phoenix, AZ
    Posts
    109
    Code :
          glGenFramebuffersEXT( 1, &m_DL_FBO );
          glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_DL_FBO);
     
          //Now make a multisample color buffer
          int samples = CDLOpenGLCaps::Instance()->Cap_int(DLOCT_MULTISAMPLE_SAMPLES);
     
          glGenRenderbuffersEXT(1, &m_DL_FBO_color_buffer);
          glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_DL_FBO_color_buffer);
          glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, samples, GL_RGBA8, m_FBO_width, m_FBO_height);
     
          //----------------------
          //Make a stencil buffer
          //This is a combo depth+stencil buffer
          //because it is the most widely supported way of doing things.
          //even when you don't need, or use, the depth buffer.
          glGenRenderbuffersEXT(1, &m_DL_FBO_stencil_buffer);
          glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_DL_FBO_stencil_buffer);
          glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, samples, GL_DEPTH24_STENCIL8_EXT, m_FBO_width, m_FBO_height);
     
     
          //It's time to attach the RBs to the FBO
          glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, m_DL_FBO_color_buffer);
          glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_DL_FBO_stencil_buffer);
          glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_DL_FBO_stencil_buffer);
          //Make sure FBO status is good
          CheckForFBOError();
          glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •