Hi Wojtek, thanks for your reply. I have instantly studied the orange book. According to the book I have to use something like: vec4 tmp = gl_ModelViewMatrix * gl_Vertex; ShadowTexcoord.s = dot(tmp, gl_EyePlaneS[1]); ShadowTexcoord.t = dot(tmp, gl_EyePlaneT[1]); ShadowTexcoord.p = dot(tmp, gl_EyePlaneR[1]); ShadowTexcoord.q = dot(tmp, gl_EyePlaneQ[1]);
But unfortunately this kills performance inacceptably and also rendering of my scene is not stable (flickering). Shadow appear as expected. On Monday 13 September 2010 13:51:02 Wojciech Lewandowski wrote: > Hi Werener, > > See VertexShader in StandardShadowMap. OpenGL Shading Languege (Orange > Book) contains a chapter on emulating fixed pipeline. And you may also try > to use 3DLabs ShaderGen. > > Wojtek Lewandowski > > -------------------------------------------------- > From: "Werner Modenbach" <[email protected]> > Sent: Monday, September 13, 2010 12:00 PM > To: <[email protected]> > Subject: [osg-users] Texture coordinate calculation in vertex shader > > > Hi everybody! > > > > I'm using osgShadow::ShadowMap on my scene. > > Also I have written my own vertex and fragment shaders. > > When coming to apply the shadow effect in the fragment shader I have to > > access > > the shadow map. > > The original shader uses just > > shadow2DProj( osgShadow_shadowTexture, gl_TexCoord[1] ) > > to access the texture. Obviously gl_TexCoord[1] is calculated by the > > standard > > gl pipeline shader. > > Any quick hint, how I have to do the calculation in my vertex shader? > > > > Many thanks in advance > > > > - Werner - > > _______________________________________________ > > 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 -- TEXION Software Solutions TEXION GmbH - Rotter Bruch 26a - D 52068 Aachen - HRB 14999 Aachen Fon: +49 241 475757-0, Fax: +49 241 475757-29, web: http://www.texion.eu Geschäftsführer/Managing Director: Werner Modenbach _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

