- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgVolume/RayTracedTechnique.cpp
r12879 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 230 230 texture3D->setWrap(osg::Texture3D::WRAP_T,osg::Texture3D::CLAMP_TO_BORDER); 231 231 texture3D->setBorderColor(osg::Vec4(0.0,0.0,0.0,0.0)); 232 if (image_3d->getPixelFormat()==GL_ALPHA || 232 if (image_3d->getPixelFormat()==GL_ALPHA || 233 233 image_3d->getPixelFormat()==GL_LUMINANCE) 234 234 { … … 304 304 } 305 305 else 306 { 306 { 307 307 osg::Shader* fragmentShader = osgDB::readShaderFile(osg::Shader::FRAGMENT, "shaders/volume_mip.frag"); 308 308 if (fragmentShader) … … 338 338 } 339 339 else 340 { 340 { 341 341 osg::Shader* fragmentShader = osgDB::readShaderFile(osg::Shader::FRAGMENT, "shaders/volume_iso.frag"); 342 342 if (fragmentShader) 343 343 { 344 344 OSG_INFO<<"Shader found"<<std::endl; 345 345 346 346 program->addShader(fragmentShader); 347 347 } … … 354 354 } 355 355 } 356 } 356 } 357 357 else if (shadingModel==Light) 358 358 { … … 374 374 } 375 375 else 376 { 376 { 377 377 osg::Shader* fragmentShader = osgDB::readShaderFile(osg::Shader::FRAGMENT, "shaders/volume_lit.frag"); 378 378 if (fragmentShader) … … 490 490 drawElements->push_back(2); 491 491 drawElements->push_back(3); 492 492 493 493 // bottom 494 494 drawElements->push_back(3); … … 525 525 geode->addDrawable(geom); 526 526 527 } 527 } 528 528 529 529 if (cpv._sampleDensityWhenMovingProperty.valid()) … … 600 600 update(uv); 601 601 return; 602 } 603 602 } 603 604 604 } 605 605 else if (nv.getVisitorType()==osg::NodeVisitor::CULL_VISITOR) … … 614 614 615 615 616 if (_volumeTile->getDirty()) 616 if (_volumeTile->getDirty()) 617 617 { 618 618 OSG_INFO<<"******* Doing init ***********"<<std::endl; … … 620 620 } 621 621 } 622 622 623 623 624 624 } // end of osgVolume namespace
