Changeset 13041 for OpenSceneGraph/trunk/src/osgFX/BumpMapping.cpp
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osgFX/BumpMapping.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgFX/BumpMapping.cpp
r11481 r13041 24 24 25 25 using osg::NodeVisitor; 26 26 27 27 // this is a visitor class that prepares all geometries in a subgraph 28 28 // by calling prepareGeometry() which in turn generates tangent-space … … 138 138 class ViewMatrixExtractor: public osg::StateAttribute { 139 139 public: 140 141 140 141 142 142 ViewMatrixExtractor() 143 143 : osg::StateAttribute(), … … 185 185 for (int i=0; i<4; ++i) { 186 186 _vp->setProgramLocalParameter(_param+i, osg::Vec4(M(0, i), M(1, i), M(2, i), M(3, i))); 187 } 187 } 188 188 } 189 189 } … … 226 226 227 227 META_Technique( 228 "FullArbTechnique", 228 "FullArbTechnique", 229 229 "Single-pass technique, requires ARB_vertex_program and ARB_fragment_program." 230 230 ); … … 338 338 " MUL result.color.front.primary.w, c5.y, R0.x;" 339 339 "END\n"; 340 340 341 341 // fragment program 342 342 std::ostringstream fp_oss; … … 412 412 413 413 // "ARB Vp" technique uses ARB vertex program and DOT3 texture environment. 414 // Ambient and specular components are not handled. A texture for the diffuse 414 // Ambient and specular components are not handled. A texture for the diffuse 415 415 // component is required as well as a normal map texture. 416 416 class ArbVpTechnique: public Technique { … … 511 511 512 512 // second pass, self-shadowing 513 bool selfShadowing = false; 513 bool selfShadowing = false; 514 514 if (selfShadowing) 515 515 { … … 546 546 547 547 osg::ref_ptr<osg::BlendFunc> bf = new osg::BlendFunc; 548 bf->setFunction(osg::BlendFunc::DST_COLOR, osg::BlendFunc::ZERO); 548 bf->setFunction(osg::BlendFunc::DST_COLOR, osg::BlendFunc::ZERO); 549 549 ss->setAttributeAndModes(bf.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON); 550 550
