winterhell's picture

How do you resolve multisample FBOs?

I understand that the buffers you are rendering TO are being made with GL.TexImage2DMultisample instead of GL.TexImage2D, and during rendering you GL.Enable(EnableCap.Multisample);

What happens after that, can you use those textures directly or you have to resolve them, and how?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
xenapior's picture

AFAIK, you can use the attached textures directly for subsequent rendering. The driver will automatically handle all necessary data manipulation things when textures are used.

winterhell's picture

It doesnt work like that. Also you cant set mipmap levels on the multisample textures.

winterhell's picture

I'm rendering to one FBO, and then blitting the result to another.
When both are using Texture2D (no AA/Multisample) it works fine.

Then I changed how the source FBO's Color and Depth textures are generated with
GL.TexImage2DMultisample(TextureTargetMultisample.Texture2DMultisample, 4, ...
instead of GL.TexImage2D(...

Bound them with GL.Ext.FramebufferTexture2D(FramebufferTarget.FramebufferExt, ...., TextureTarget.Texture2DMultisample,...
instead of TextureTarget.Texture2D,

And finally Enabled EnableCap.Multisample before rendering to the source.

Why is it not working?
Do I have to switch the source textures with RenderBuffers and how/why?