Use GL_RGBA32F for screen output

For render-to-texture, it’s easy to adjust the format and precision of the underlying texture. But how can I do this for the output of the screen?

You may wonder why I need extra precision for screen output, that is because I often use RenderDoc to capture frames and debug. For intermediate passes, the extra precision and range of those textures help me a lot. I want my final output to be also that convenient.

I know I can use an extra pass to first render to a texture and then copy the result to the screen. But I try to avoid those unnecessary render passes and find a simple way to implement my effect.

Thanks in advance.

Generally speaking, you don’t. While you can manipulate the default framebuffer’s format to some extent, you will likely be unable to create a floating-point default framebuffer. Why?

Because the default framebuffer ultimately represents something beyond the control of your application: the OS, windowing system, and display hardware. And basically none of that knows how to handle floating-point images. Even your monitor has no idea what to do with them.

You don’t draw floating-point images. You convert them to fixed point, within a particular dynamic range. And that’s what gets displayed.

Thanks for your reply. After reading your explanation, now I know why can’t find any solutions.