[osg-users] Multiple render targets
john.donovan at embryonicstudios.com
Fri Sep 14 05:26:28 PDT 2007
Ah! That'd explain it :) Thanks JP.
It would be handy to have a look at what you've done; perhaps we can both faff
about with it to make it submittable.
J.P. Delport wrote:
> as far as I know its not supported in current version of OSG, there is
> no call to glDrawBuffers (as opposed to glDrawBuffer) which is needed
> for MRT.
> I have a version of RenderStage.cpp that I modified to allow MRT for one
> of our projects, but its a hack and I still need to properly organise it
> before I can submit a patch.
> I can post it with instructions if you want it?
> John Donovan wrote:
>> is there anything else I need to do to render to two textures with the same
>> fragment shader? I have the following code:
>> cam->attach(Camera::COLOR_BUFFER0, _texture.get());
>> cam->attach(Camera::COLOR_BUFFER1, _texture2.get());
>> And the following fragment shader:
>> void main(void)
>> gl_FragData = vec4(1.0, 0.0, 0.0, 1.0);
>> gl_FragData = vec4(0.4, 0.4, 0.0, 1.0);
>> The first texture comes out red as expected, but the second one (which is
>> identical in size and format as the first) comes out black.
>> This email has been scanned by the MessageLabs Email Security System.
>> For more information please visit http://www.messagelabs.com/email
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
More information about the osg-users