Hi Mateo, I'm a bit confused as to what you are actually doing, my best guess is that it's something like shadow mapping. The best place to start is to have a look at the osgprerender example and others similar to it. Have a look at all examples that use osg::Camera when doing render to texture, also have a look at the osgShadow library as it's osg::Camera usage will show how to set up the Camera to create a render to depth texture.
Robert. On 6 December 2012 11:22, Mateo Gasparovic <[email protected]> wrote: > Hi, > > I am beginner in the OpenSceneGraph in OpenGL. I have made a program for > Projecting textures using fragment and vertex shaders. The problem is that > texture is projected throughout the object. > I have an idea to deal with this by using shadows (depth) map. The position > of light source is the same like the position of the projector, which I used > for Projecting texture. > The idea is to disguise (mask) all the textures of the object that are in > shadow. Actually, I want to projects a texture only to do visible part of > object (at the time of shooting). > How to create a shadow (depth) map in OSG or OpenGL sheader? How to mask > unwanted texture on 3D model? > > Thank you! > > Cheers, > Mateo > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=51437#51437 > > > > > > _______________________________________________ > 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

