Brad, I once had the same issue; calcuating my texgen matrix like this worked:
texGenMat = modelViewMat * projectionMat * osg::Matrix::translate(1, 1, 1) * osg::Matrix::scale(0.5, 0.5, 0.5); Glenn Waldron / Pelican Mapping / @glennwaldron On Wed, Sep 28, 2011 at 7:34 PM, Brad Colbert <bcolb...@rscusa.com> wrote: > Hi Chris, > > Thanks! I found that one too but it still doesn't help me figure out how > to fix the coordinates so that my projected texture renders in the center of > the projection frustum instead of the upper right quadrant. It's strange > and I can't figure it out. > > -B > > > -----Original Message----- > From: osg-users-boun...@lists.openscenegraph.org [mailto: > osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris 'Xenon' > Hanson > Sent: Wednesday, September 28, 2011 3:31 PM > To: OpenSceneGraph Users > Subject: Re: [osg-users] GLSL shaders and projective texturing > > On 9/27/2011 7:21 PM, Brad Colbert wrote: > > I am closer! > > Looks like the other example I have is FFP not GLSL. Here's a working GLSL > implementation (not OSG) that should be relatively easy to feed with OSG > uniforms and such: > > http://www.ozone3d.net/tutorials/glsl_texturing_p08.php#part_8 > > -- > Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com > http://www.alphapixel.com/ > Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. > Contracting. > "There is no Truth. There is only Perception. To Perceive is to Exist." > - Xen > _______________________________________________ > 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 >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org