Re: [osg-users] Copying rendered image before and after post-processing
Hi Sebastian, Thanks for your answer. Eventually I went with a another solution (copy a scaled-down texture), as copying with alternating PBOs always resulted in the texture after post-processing. Unfortunately I had no more time for this. It could be related to old hardware though (GeForce 8800). Thanks, Shahar Sebastian Messerschmidt wrote: Hi Shahar, I guess your scene is being rendered to an FBO already. So simply create a camera taking the resulting FBO as input, a new texture as output an attach a simple glsl program to copy. Also I guess osgPPU has some copy processor, but I'm not sure. cheers Sebastian Hi, I've got an OSG application with a single viewer and camera. The camera is set to render to FBO - Code: camera-attach(osg::Camera::COLOR_BUFFER0, m_texture2D); camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); Rendering consists of the following main steps: 1) Render scene 2) Post-processing using osgPPU 3) In final draw callback, copy the rendered image to the application using two alternating PBOs Now I'd like to add one more step - 1.5) Copy the rendered image to application before post-processing The copied image will only be used in the application (e.g. to save it), and will not be displayed nor copied back to the graphics card (like the osgprerender example). In addition, I don't mind getting it with a delay of a few frames. How would you recommend implementing this step efficiently, while maintaining the current performance level of the application (runs at 60Hz). I guess I could use two separate cameras to render the scene (one without osgPPU), but I wonder if there is a better way. Thanks, Shahar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55940#55940 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56024#56024 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Copying rendered image before and after post-processing
Hi, I've got an OSG application with a single viewer and camera. The camera is set to render to FBO - Code: camera-attach(osg::Camera::COLOR_BUFFER0, m_texture2D); camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); Rendering consists of the following main steps: 1) Render scene 2) Post-processing using osgPPU 3) In final draw callback, copy the rendered image to the application using two alternating PBOs Now I'd like to add one more step - 1.5) Copy the rendered image to application before post-processing The copied image will only be used in the application (e.g. to save it), and will not be displayed nor copied back to the graphics card (like the osgprerender example). In addition, I don't mind getting it with a delay of a few frames. How would you recommend implementing this step efficiently, while maintaining the current performance level of the application (runs at 60Hz). I guess I could use two separate cameras to render the scene (one without osgPPU), but I wonder if there is a better way. Thanks, Shahar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55940#55940 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Copying rendered image before and after post-processing
Hi Shahar, I guess your scene is being rendered to an FBO already. So simply create a camera taking the resulting FBO as input, a new texture as output an attach a simple glsl program to copy. Also I guess osgPPU has some copy processor, but I'm not sure. cheers Sebastian Hi, I've got an OSG application with a single viewer and camera. The camera is set to render to FBO - Code: camera-attach(osg::Camera::COLOR_BUFFER0, m_texture2D); camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); Rendering consists of the following main steps: 1) Render scene 2) Post-processing using osgPPU 3) In final draw callback, copy the rendered image to the application using two alternating PBOs Now I'd like to add one more step - 1.5) Copy the rendered image to application before post-processing The copied image will only be used in the application (e.g. to save it), and will not be displayed nor copied back to the graphics card (like the osgprerender example). In addition, I don't mind getting it with a delay of a few frames. How would you recommend implementing this step efficiently, while maintaining the current performance level of the application (runs at 60Hz). I guess I could use two separate cameras to render the scene (one without osgPPU), but I wonder if there is a better way. Thanks, Shahar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55940#55940 ___ 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