[osg-users] Custom Vertex Shader with Parallel Split Shadow Maps

Julien Valentin julienvalentin51 at gmail.com
Mon Aug 31 15:14:03 PDT 2015


Hi,

After a long time here's our answer:


Code:

vec4 pos=ftransform();
vec3  ecPosition3 = pos.xyz / pos.w;                       
vec4  ecPosition=vec4(ecPosition3,1); 
gl_TexCoord[1].s = dot( ecPosition, gl_EyePlaneS[1] );     
gl_TexCoord[1].t = dot( ecPosition, gl_EyePlaneT[1] );     
gl_TexCoord[1].p = dot( ecPosition, gl_EyePlaneR[1] );    
gl_TexCoord[1].q = dot( ecPosition, gl_EyePlaneQ[1] );      



cf osgShadow/StandardShadowMap.cpp

Cheers,
Julien

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








More information about the osg-users mailing list