Multiple rendering goals in one FBO with different texture sizes?

Can I have textures of different sizes attached to the same FBO and then use them for multiple rendering purposes? Do I need to do anything special with glViewport to make this happen? Suppose I have a texture of 1024 × 1024 for COLOR_ATTACHMENT0 and a texture of 512x512 for COLOR_ATTACHMENT1 , and I call glDrawBuffers(2, {COLOR_ATTACHMENT0, COLOR_ATTACHMENT1}) (I understand that the syntax is incorrect, but you get the idea ...), will it display the idea ...) full scene in both applications? I basically think that the usefulness of this is the ability to render the scene in full quality and with reduced sampling at one time, possibly with certain masks or so that it can be used in the effects composer / post-processing. Many thanks!

+4
source share
1 answer

Since GL3.0 you can attach textures of different sizes. But you should know that the displayed area will be one of the smallest textures. Read here: http://www.opengl.org/wiki/Framebuffer_Object

+3
source

Source: https://habr.com/ru/post/1501115/


All Articles