Due to several reasons I had to convert a project to above versions.
I was successful almost all over the project due to the excellent work
of osg exported uniforms etc.
The last item I have to solve now is shadow.
I'm using osgShadow::LightSpacePerspectiveShadowMapCB and I found out
how to replace
the given shaders.
In my old vertex shader I had to calculate the shadow texture coordinate
like that:
if(useShadow){
gl_TexCoord[1].s=dot(eye,gl_EyePlaneS[1]);
gl_TexCoord[1].t=dot(eye,gl_EyePlaneT[1]);
gl_TexCoord[1].p=dot(eye,gl_EyePlaneR[1]);
gl_TexCoord[1].q=dot(eye,gl_EyePlaneQ[1]);
}
Unfortunately the gl_EyePanes are no more available.
I also couldn't find any uniform exports like osg_vertex etc.
Is there any way I can calculate this inside the vertex shader
by using the given uniforms and the eye position?
Or is there anything I can precalculate on CPU and provide it via uniform?
Any help is highly appreciated.
- Werner -
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org