Hi,

I think u must use shader to achieve it. 
u can bind regular color buffer,but using gl_FragColor.rgb = normal.xyz in 
fragment shader.
the fallback is that you need to render the Node twice.
OSG support this way.

If you're familiar with OpenGL4.x,you can use GL_COLOR_ATTACHMENT_i Frame 
Buffer attachment,then use Multi-Render target to do this.
layout(location =1) out vec4 normal;
{
 normal = Computednormal;
}

But I'm not sure whether OSG support this feather.



Thank you!

Cheers,
Yu

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=76896#76896





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to