Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7192207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:53:33+00:00 2026-05-28T19:53:33+00:00

I just switched my OpenGL drawing code from drawing to the display directly to

  • 0

I just switched my OpenGL drawing code from drawing to the display directly to using an off-screen FBO with render buffers attached. The off-screen FBO is blitted to the screen correctly when I allocate normal render buffer storage.

However, when I enable multisampling on the render buffers (via glRenderbufferStorageMultisample), every color in the scene seems like it has been brightened (thus giving different colors than the non-multisampled part).

I suspect there’s some glEnable option that I need to set to maintain the same colors, but I can’t seem to find any mention of this problem elsewhere.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:53:34+00:00Added an answer on May 28, 2026 at 7:53 pm

    I stumbled upon the same problem, due to the lack of proper downsampling because of mismatching sample locations. What worked for me was:

    • A separate “single sample” FBO with identical attachments, format and dimension (with texture or renderbuffer attached) to blit into for downsampling and then draw/blit this to the window buffer
    • Render into a multisample window buffer with multisample texture having the same sample count as input, by passing all corresponding samples per fragment using a GLSL fragment shader. This worked with sample shading enabled and is the overkill approach for deferred shading as you can calculate light, shadow, AO, etc. per sample.
    • I did also rather sloppy manual downsampling to single sample framebuffers using GLSL, where I had to fetch each sample separately using texelFetch().

    Things got really slow with multisampling. Although CSAA performed better than MSAA, I recommend to take a look at FXAA shaders for postprocessing as a considerable alternative, when performance is an issue or those rather new extensions required, such as ARB_texture_multisample, are not available.

    Accessing samples in GLSL:

    vec4 texelDownsampleAvg(sampler2DMS sampler,ivec2 texelCoord,const int sampleCount)
    {
        vec4 accum = texelFetch(sampler,texelCoord,0);
        for(int sample = 1; sample < sampleCount; ++sample) {
            accum += texelFetch(sampler,texelCoord,sample);
        }
        return accum / sampleCount;
    }
    
    • http://developer.download.nvidia.com/opengl/specs/GL_EXT_framebuffer_multisample.txt

    • http://developer.download.nvidia.com/opengl/specs/GL_EXT_framebuffer_blit.txt

    11) Should blits be allowed between buffers of different bit sizes?

    Resolved: Yes, for color buffers only.  Attempting to blit
    between depth or stencil buffers of different size generates
    INVALID_OPERATION.
    

    13) How should BlitFramebuffer color space conversion be
    specified? Do we allow context clamp state to affect the
    blit?

    Resolved: Blitting to a fixed point buffer always clamps,
    blitting to a floating point buffer never clamps.  The context
    state is ignored.
    
    • http://www.opengl.org/registry/specs/ARB/sample_shading.txt

    • Blitting multisampled FBO with multiple color attachments in OpenGL

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just switched my code from Objective-C to Objective-C++. Everything goes swimmingly except for
I just switched from storing my images uploaded via Carrierwave locally to using Amazon
I just switched to C++ from C# I wrote a link list code in
I have just switched over from the old png transparency fix using a htc
I recently switched from using NSTimer to CVDisplayLink to redraw my OpenGL animation, but
I just switched from using Passenger to using POW because I didn't have to
I just switched from windows (Visual Studio) to Linux (Mint) and now I'm using
Just switched over from eclipse to vs 2008 for debugging javascript, i feel more
I just switched my persistence.xml from <property name=toplink.ddl-generation value=drop-and-create-tables/> to <property name=toplink.ddl-generation value=create-tables/> and
We just switched from TFS to SVN, and so far we're loving it. However,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.