PDA

View Full Version : MRT output



hbuel
01-09-2007, 11:31 AM
Hi,

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

ehart
01-09-2007, 11:56 AM
You write to gl_FragData instead:

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

-Evan

hbuel
01-11-2007, 10:22 PM
Thank you very much!