Re: [osg-users] GLSL Setting up gl_EyePlane
Hi Paul, depending on what you are trying to achieve, you've got to update the planes every frame in the way you mentioned. If your matrix is somehow connected to the View or Modeling matrices, you need to update them. You can use a updateCallback or look into the samples for TexGenNode IIRC. hth Sebastian Hi,Just a small one - Are the gl_EyePlanes automatically setup when calling texgen-setPlanesFromMatrix(...)? I'm trying to replicate simple Projective texturing using glsl. Regards IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GLSL Setting up gl_EyePlane
Hi Paul, Hi,Just a small one - Are the gl_EyePlanes automatically setup when calling texgen-setPlanesFromMatrix(...)? I'm trying to replicate simple Projective texturing using glsl. I am not sure what you mean by automatically... It will be applied to OpenGL in draw phase. When used with TexGenNode it will be applied globally for whole render stage nad used for all the scene. If used as TextureStateAttribute it will be applied by lazy state update when drawables using this attribute are drawn. Small warning: If you intend to use EYE_LINEAR TexGen as a texture state attribute it won't most probably work as you expect. Its due to unpredictability of glModelView matrix which will be current when TexGen gets applied by lazy state update. Basically TexGen as texture state attribute will work in predictable way with modes that use vertex coords (not require eye coords). Cheers, Wojtek Lewandowski ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] GLSL Setting up gl_EyePlane
Hi,Just a small one - Are the gl_EyePlanes automatically setup when calling texgen-setPlanesFromMatrix(...)? I'm trying to replicate simple Projective texturing using glsl. Regards IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org