[osg-users] Multipass shading, black texture coming out of the first pass
Hellhound at binary-revolution.org
Thu Oct 18 09:09:09 PDT 2007
i will take a look at your code when i am back from office. Before i
additional information for you:
Yesterday i've played a little bit arround with my solution and try to
problem in a first dirty solution. For that i've created two HUD
first where i bind the 2nd Pass shader (set glFragColor to red to check
if it is
executed) and a second where i bind the texture of the second pass RTT.
This 2nd RTT shows me the same result as the first rtt and not the red
result of the 2nd pass. First i thought this was an other bug, but i've
a little bit about it and now i think it's correct... I think the
be in the binding of the cameras of the rrt's!
The RTT camera of the second pass points to the same object like the
camera. The result of the second pass is shown to the hud, so it's
that the second RTT shows a red colored object ...
Perhaps it help's you to find a solution.
Swen Walkowski wrote:
> 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);
> Shader* discardShader = new Shader(Shader::DISCARD, true,
> invertShader->getTexture(), 1);
> 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.
> osg-users mailing list
> osg-users at lists.openscenegraph.org
More information about the osg-users