[osg-users] RTT second pass

2011-09-28 Thread Sebastian Messerschmidt
Hello again, In my project I need to setup a second render pass that performs the following: Render the scene from the original camera's view (as in the first RTT pass). Set the second camera to be pre-render with render-order increased. Render some volumes and apply a shader a those positions

[osg-users] RTT second pass

2011-09-30 Thread Sergey Kurdakov
Hi you might use osg::Switch see http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/examples/osggameoflife example ( see ProcessPass::ProcessPass(osg::TextureRectangle *in_tex,                        osg::TextureRectangle *out_tex, ) and then there is osgPPU http://project

[osg-users] RTT second pass

2011-09-30 Thread Sergey Kurdakov
Hi, forgot so follow up - concerning osg::Camera::FRAME_BUFFER_OBJECT for attaching depth etc to frame buffer object you might want to check this page http://www.opengl.org/wiki/Framebuffer_Object_Examples Regards Sergey ___ osg-users mailing list os

[osg-users] RTT second pass

2011-09-30 Thread Sergey Kurdakov
Hi Sebastian, as for depth buffer - you might try ( not sure though ) two approaches a) use depth replace shader ( replace current depth with provided depth ) b) use depth testing in shader - such that you manually compute depth value and compare it with attached depth texture in shader see http

Re: [osg-users] RTT second pass

2011-09-30 Thread Sebastian Messerschmidt
I'm quite desperate on this one, any advises how to setup the camera in the second pass, anyone? Hello again, In my project I need to setup a second render pass that performs the following: Render the scene from the original camera's view (as in the first RTT pass). Set the second camera t

Re: [osg-users] RTT second pass

2011-09-30 Thread Sebastian Messerschmidt
Hello Sergey, Thanks for the hints so far. I'll check the approaches. Hi Sebastian, as for depth buffer - you might try ( not sure though ) two approaches a) use depth replace shader ( replace current depth with provided depth ) b) use depth testing in shader - such that you manually compute