Hi
 
osgppu drawing screen aligned quad with each pass, using texture data you've provided as input. It does not have access to your scene in any way except of mentioned textures.
vertex shader process vertices of this quad
normals you are getting is normals of this quad (so they are all the same, and facing to camera with value vec3(0,0,1)), and not those of your scene.
 
Cheers.
09.10.2012, 16:46, "Peterakos" <[email protected]>:
Hello.
Is it possible to retrieve the normal map using osgPPU ?
I have used the following shaders and a blue screen appears.
Vert
-----------
varying vec3 normal;
void main(void){
gl_Position = ftransform();
normal =  gl_NormalMatrix * gl_Normal;
}
Frag
-----------
varying vec3 normal;
void main(){
gl_FragColor = vec4(normal,1);
}
I guess the blue color means that the normal.z is always 1.
In some examples in osgPPU solution, i have noticed that vertex shaders are used.
Which vertices are passed through these shaders ? All of the scene's vertices or just the ones that are visible ?
Thank you.
,

_______________________________________________
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