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

Reply via email to