Hello,
I want to record more than four elements by writing to out variable
in fragment shader.
I notice that FBO can connect to many buffers, so I define two images
which are respectively attached to a color buffer and a depth buffer.
osg source code are as follows:
osg::Image
Hi
try this image for depth -
imageDepth-allocateImage((int)subXRes, (int)subYRes, 1,
GL_DEPTH_COMPONENT32,
GL_UNSIGNED_INT);
Also you can use multiple render targets to output up to 4 color
textures(rgba), you need to attach buffers to osg::Camera::COLOR_BUFFER0 (1,2
etc) and output
2 matches
Mail list logo