modiyf conwave

This commit is contained in:
jiegeaiai 2025-01-26 08:08:25 +08:00
parent c733281598
commit 84849a25bc
2 changed files with 8 additions and 7 deletions

View File

@ -165,6 +165,7 @@ target_link_libraries(
osgParticle
osgSim
osgWidget
osgText
osgEarth
Triton-MT-DLL
libeng

View File

@ -136,13 +136,13 @@ void ConeWave::CreateTexturedCone(osg::Geode* geode) {
stateset->setRenderBinDetails(120, "RenderBin");
osg::ref_ptr<osg::BlendFunc> blendFunc = new osg::BlendFunc();
stateset->setAttributeAndModes(blendFunc, osg::StateAttribute::ON);
//osg::ref_ptr<osg::Program> program = new osg::Program();
//program->addShader(vertexShader);
//program->addShader(fragmentShader);
VirtualProgram* vp = VirtualProgram::getOrCreate(outlineSS);
vp->setFunction("VS", VS, ShaderComp::LOCATION_VERTEX_CLIP);
vp->setFunction("FS", FS, ShaderComp::LOCATION_FRAGMENT_COLORING);
outline->addChild(node);
osg::ref_ptr<osg::Program> program = new osg::Program();
program->addShader(vertexShader);
program->addShader(fragmentShader);
//VirtualProgram* vp = VirtualProgram::getOrCreate(outlineSS);
//vp->setFunction("VS", VS, ShaderComp::LOCATION_VERTEX_CLIP);
//vp->setFunction("FS", FS, ShaderComp::LOCATION_FRAGMENT_COLORING);
//outline->addChild(node);
baseColorUniform_ = new osg::Uniform("baseColor", baseColor_);
stateset->setMode(GL_CULL_FACE, osg::StateAttribute::ON);