MRT output


I’ve been wondering. I know by now how to setup to activate mutiple render targets, but how can I write to them in the shader? Since I couldn’t find something like gl_FragColor2 or something?

thank you very much

You write to gl_FragData instead:

gl_FragData[0] = color_for_first_buffer;
gl_FragData[1] = color_for_second_buffer;


Thank you very much!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.