Re: [osg-users] Problem replacing shader built-ins (gl_EyePlane)

2014-01-08 Thread Garrett Cope
Hi Robert, Thanks for the reply. So the proper construction of the set of gl_EyePlaneX planes would be: InvMVL * ProjL * osg::Matrix::translate(1.0,1.0,1.0) * osg::Matrix::scale(0.5,0.5,0.5) with InvMVL == Inverse ModelView matrix for shadow camera and ProjL == Projection matrix for shadow ca

Re: [osg-users] Problem replacing shader built-ins (gl_EyePlane)

2014-01-07 Thread Robert Milharcic
On 7.1.2014 22:12, Garrett Cope wrote: I am using the VDSM implementation and passing in the 4 planes as found in assignTexGenSettings(...), but they seem to be different than what is actually found in the built-ins during shader execution. I am guessing there is some sort of modelview transfo

[osg-users] Problem replacing shader built-ins (gl_EyePlane)

2014-01-07 Thread Garrett Cope
Hi, I've been working on updating our shaders to remove the deprecated built-ins. I've gotten stuck on the gl_EyePlanes as used to compute projected shadow texture coordinates as follows (same convention as osg-generated shadow shaders): Code: gl_TexCoord[shadowTextureUnit0].s = dot( ecPosit