Re: [osg-users] Is it possible to clear just certain textures in a framebuffer with multi target rendering?
Hi Amudhan, Hi Sebastian, Thanks for your reply. It worked using 2 cameras passes to achieve the result. I was wondering to achieve the same result with single pass. I will be working huge models and i didn't want to run 2 passes. Since you're doing MRT and multiple passes anyway, can't you simply add an otherwise empty pass that only clears? So basically binding the rendertarget you need to clear and do nothing but clear. Is there any plan to add this extension to OSG? OpenSceneGraph is community driven anyone is invited to contribute. In my opinion adding extensions is usually a relatively complicated process, since there are a lot of side effects to be taken into account, but we're glad to help if you want to try. Cheers Sebastian Thank you! Thanks and Regards, Amudhan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=71705#71705 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is it possible to clear just certain textures in a framebuffer with multi target rendering?
Hi Sebastian, Thanks for your reply. It worked using 2 cameras passes to achieve the result. I was wondering to achieve the same result with single pass. I will be working huge models and i didn't want to run 2 passes. Is there any plan to add this extension to OSG? Thank you! Thanks and Regards, Amudhan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=71705#71705 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is it possible to clear just certain textures in a framebuffer with multi target rendering?
Hi, This can usually done by setting the explicit drawbuffer and a consecutive call to glClear with the appropriate color set. In OSG-terms I'd use a separate camera pass with the appropriate buffers bound. Another option, if you need to selectively write to a certain color buffer only is to use the ColorMaski to select the buffers you need to write to. Last option is to add the extension to OSG. Cheers Sebastian Hi, Is it possible to clear just certain textures in a framebuffer with multi target rendering? i am searching for equivalent functionality for glClearBufferfv. Any help would be greatly appreciated. example shader code: out vec4 fragcolor1; // first target out vec4 fragcolor2; // second target void main() { fragcolor1 = vec4(1.0,0.0,0.0,1.0); fragcolor2.g = 1.0; } basically i want to initialize first target as osg::Vec4(0.0,0.0,0.0,0.0); and i want to initialize my second target to osg::Vec4(1.0,0.0,0.0,0.0). I tried calling setClearColor in osg::Camera, but this initializes both targets to same value. Thanks & Regards, amudhan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=71694#71694 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org