Hi Andrea,

The piece of code was just some hack to demonstrate that the pipeline itself is working.
What I don't understand is why you do not simply do it in one pass ....
Anyways, to get the correct texture coordinates you'll need to distort them them same way you did for the vertices.
You could do this in the vertex shader or in the fragment shader.


Hi,

using your suggestion :

"texture2D(previousTexture, gl_FragCoord.xy/ vec2(1024.0,512.0))"

i think to solve my doubts.

Pratically, what i would like to do is to use the color information coming from 
the first pass, to color the twisted mesh of the second pass (using two 
different and separate shaders).


Thank you!

Cheers,
Andrea

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53767#53767





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to