From e2743145485c125297aaa1d26078375f7b9b5ad6 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 24 Jun 2014 19:51:30 +0200 Subject: [PATCH] Ignore alpha modifier for particle materials This makes the tx_ash_flake.dds particles from ashcloud.nif appear. --- components/nifogre/material.cpp | 6 ++++-- components/nifogre/material.hpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/nifogre/material.cpp b/components/nifogre/material.cpp index b1ae83107b..cc06d65f35 100644 --- a/components/nifogre/material.cpp +++ b/components/nifogre/material.cpp @@ -106,7 +106,7 @@ Ogre::String NIFMaterialLoader::getMaterial(const Nif::ShapeData *shapedata, const Nif::NiZBufferProperty *zprop, const Nif::NiSpecularProperty *specprop, const Nif::NiWireframeProperty *wireprop, - bool &needTangents, bool disableLighting) + bool &needTangents, bool particleMaterial) { Ogre::MaterialManager &matMgr = Ogre::MaterialManager::getSingleton(); Ogre::MaterialPtr material = matMgr.getByName(name); @@ -245,8 +245,10 @@ Ogre::String NIFMaterialLoader::getMaterial(const Nif::ShapeData *shapedata, } } - if (disableLighting) + if (particleMaterial) { + alpha = 1.f; // Apparently ignored, might be overridden by particle vertex colors? + ambient = Ogre::Vector3(0.f); diffuse = Ogre::Vector3(0.f); specular = Ogre::Vector3(0.f); diff --git a/components/nifogre/material.hpp b/components/nifogre/material.hpp index 890255dcc6..abe1982eb9 100644 --- a/components/nifogre/material.hpp +++ b/components/nifogre/material.hpp @@ -49,7 +49,7 @@ public: const Nif::NiZBufferProperty *zprop, const Nif::NiSpecularProperty *specprop, const Nif::NiWireframeProperty *wireprop, - bool &needTangents, bool disableLighting=false); + bool &needTangents, bool particleMaterial=false); }; }