Hi,

Miika Aittala wrote:
Ok, here's a little example (code is attached). Sorry if it's a bit contrived, 
I couldn't think of anything simple but illustrative. Basically it renders a 
cylinder with the following stages:

1) Render the cylinder to a texture from slaveCamera
2) Process the texture from stage 1 with firstProcessor, inverting the colors
3) Render the cylinder to a texture from viewer->camera, this time using the 
result of stage 2 as a texture
4) Process the texture from stage 3 with secondProcessor, which makes the image 
look wavy

The problem is that instead of this ordering, we get 1-3-2-4, which means that 
the pre-render result is always from the previous frame. If you compile and run 
the program, you'll notice that this causes a green fringe at the edges of the 
cylinder when you make it move (because the background color of the texture is 
green). Here's an image of this whole thing:

http://a.imagehost.org/view/0333/osgppukuva

To fix this problem, we can try to add firstProcessor as a child of slaveCamera 
instead of root, as explained in my previous posts. However, this somehow 
breaks stage 3, which refuses to render to a texture anymore.

sorry, I have not had time to run your test app, just thinking out loud...

what happens if stage 3 is again a pre-render RTT camera with the processor as a child and you then use the viewer camera only to display the final output quad? Have you tried commenting out the osgPPU setting of bin numbers?

jp



--
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
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to