Show
Ignore:
Timestamp:
09/26/08 17:47:31 (6 years ago)
Author:
robert
Message:

Improved GLSL isosurface support when using a transfer function

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp

    r8951 r8952  
    877877 
    878878        stateset->setTextureAttributeAndModes(0,texture3D,osg::StateAttribute::ON); 
     879 
     880        osg::Uniform* baseTextureSampler = new osg::Uniform("baseTexture",0); 
     881        stateset->addUniform(baseTextureSampler); 
    879882    } 
    880883     
     
    944947            stateset->setTextureAttributeAndModes(0,texture1D,osg::StateAttribute::ON); 
    945948 
    946             osg::Shader* fragmentShader = osgDB::readShaderFile(osg::Shader::FRAGMENT, "volume-tf-iso.frag"); 
     949            osg::Shader* fragmentShader = osgDB::readShaderFile(osg::Shader::FRAGMENT, "volume_tf_iso.frag"); 
    947950            if (fragmentShader) 
    948951            { 
     
    10571060    else 
    10581061    {     
     1062 
    10591063        osg::Shader* fragmentShader = osgDB::readShaderFile(osg::Shader::FRAGMENT, "volume.frag"); 
    10601064        if (fragmentShader) 
     
    10681072        } 
    10691073    } 
    1070     osg::Uniform* baseTextureSampler = new osg::Uniform("baseTexture",0); 
    1071     stateset->addUniform(baseTextureSampler); 
    10721074 
    10731075    osg::Uniform* sampleDensity = new osg::Uniform("sampleDensity", 0.01f);