diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 5a96937406..07cbaee374 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -1809,14 +1809,6 @@ namespace NifOsg if (specFlags == 0) mat->setSpecular(osg::Material::FRONT_AND_BACK, osg::Vec4f(0.f,0.f,0.f,0.f)); - // Particles don't have normals, so can't be diffuse lit. - if (particleMaterial) - { - // NB ignoring diffuse.a() - mat->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(0,0,0,1)); - mat->setColorMode(osg::Material::AMBIENT); - } - if (lightmode == 0) { osg::Vec4f diffuse = mat->getDiffuse(osg::Material::FRONT_AND_BACK); diff --git a/components/nifosg/particle.cpp b/components/nifosg/particle.cpp index c1ccede1a8..2a79af1c87 100644 --- a/components/nifosg/particle.cpp +++ b/components/nifosg/particle.cpp @@ -159,8 +159,11 @@ void ParticleColorAffector::operate(osgParticle::Particle* particle, double /* d { float time = static_cast(particle->getAge()/particle->getLifeTime()); osg::Vec4f color = mData.interpKey(time); + float alpha = color.a(); + color.a() = 1.0f; particle->setColorRange(osgParticle::rangev4(color, color)); + particle->setAlphaRange(osgParticle::rangef(alpha, alpha)); } GravityAffector::GravityAffector(const Nif::NiGravity *gravity)