Hi,
Роман Григорьев wrote:
Hi I try to implement cellular automata clouds on OSG and have some problem
1) I can’t use (or don’t know) ping-pong rendering technique as
described here http://www.m3xbox.com/GPU_blog/?m=200712
Because when I attach 2 textures to camera FBO in rendering loop camera
render to 2 FBO but I need to change dynamically which draw buffer I
need to draw/
Can you not also pass the draw buffer as a uniform to the shader and
then use that in glFragData[buffer] call? This can select which of two
textures to render to.
I’ve red about RenderStage but how to control it is
unclear for me. I’ve make a workaround that create another camera that
render FBO texture to another FBO texture that can I attach in 1 stage
to calculate cellular automata.
If you have the same shader code for both cameras, I think you can get
away with only a single camera and multiple targets.
2) I’d like to do RTT rendering not in every frame. But As I understand
OSG create rendercashe to strore rendering order how can I dynamically
attach and remove camera from rendering order?
Switching on and off could be done with Switch node or mask as Robert
said. Not sure about switching order dynamically, but I'm still not sure
you need it.
See my example. If anyone is interested in my program I can share.
If you could send me a simple version of your shader I can have a look.
jp
Thanx in advance
Roman
------------------------------------------------------------------------
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org