[osg-users] Multipass shading, black texture coming out of the first pass

Swen Walkowski usedformailinglists at googlemail.com
Wed Oct 17 11:25:46 PDT 2007


Hello Christian,

thanks for your answerer. I modified my code the last days a lot. Now I 
am sure that my shaders are executed.
Now I still have the same problem like you. I always get the last shader 
displayed.

To add the shaders to the graph I use that code:
Shader* invertShader = new Shader(Shader::INVERT, false, NULL, 0);
videoBackground->addChild(invertShader->getCamera());

Shader* discardShader = new Shader(Shader::DISCARD, true, 
invertShader->getTexture(), 1);
videoBackground->addChild(discardShader->getCamera());

     videoBackground.get()->setStateSet(discardShader->getStateSet());
videoBackground.get()->init();

I add my new code if you want take a look in.
Hope we will find a way to solve that problem. I am still on it.

Please let me know when you found out something.

Best,
Swen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attachment.zip
Type: application/x-zip-compressed
Size: 1674 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071017/25822167/attachment-0003.bin>


More information about the osg-users mailing list