Hi Claus-Peter, VirtualPlanetBuilder/osgdem won't assign uniforms for you, but this isn't necessary as the OSG supports state inheritances, so you can define your own StateSet's that decorate your terrain and the state they define will be inherited down so you can assign your shaders and uniforms on this decorating StateSet.
Robert. On Thu, Jun 25, 2009 at 9:35 AM, Claus-Peter Karweck<[email protected]> wrote: > Hi, > > I'm new to osg. My version of osg is 2.8.0 and vpb 0.9.10 (WinXP). > I have generated a terrain scenegraph with a command like > osgdem -t bottomtype.tif -d elevation.tif -l 3 -o terrain.ive --POLYGONAL > and I have added it to my main scenegraph and it works fine. > Now I want to render the terrain scenegraph with a shader to modify some > things, > but without uniform statements I have no access to the texture data. > Are there any parameter for osgdem will generate these uniform statements for > my application? > Perhaps I look over the right parameter an do not see the right way. > (For a quick and dirty workaround I converted the terrain.ive file into > terrain.osg and > added the uniform statement at the state set with an editor and it works!) > I'm also interessed on knowing which subtile is rendered by the shader! > > While converting the terrain.ive into terrain.osg with > osgconv terrain.ive terrain.osg -O OutputTextureFiles > I observed a loss of precision in some floating point parameter. > I found the option parameter (-O precision) but it seems not to work. What is > the correct syntax for that > option parameter and which parameter values will work? > > > Thank you! > > Cheers, > Claus-Peter > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=14483#14483 > > > > > > _______________________________________________ > 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

