From b2109a13028513bf4f81759b5cc880fd687f925d Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 4 Mar 2012 22:01:02 +0100 Subject: [PATCH] make the vertex colours only affect diffuse, this caused some areas to be darker than they should be --- components/nifogre/ogre_nif_loader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/nifogre/ogre_nif_loader.cpp b/components/nifogre/ogre_nif_loader.cpp index 7ffc9561f..3e11eda66 100644 --- a/components/nifogre/ogre_nif_loader.cpp +++ b/components/nifogre/ogre_nif_loader.cpp @@ -407,8 +407,8 @@ void NIFLoader::createMaterial(const String &name, } outStream << - " float3 lightingFinal = lightColour.xyz * diffuse.xyz + ambient.xyz * lightAmbient.xyz + emissive.xyz; \n" - " oColor.xyz = lerp(lightingFinal * tex.xyz * vertexColour.xyz, fogColour, fogValue); \n" + " float3 lightingFinal = lightColour.xyz * diffuse.xyz * vertexColour.xyz + ambient.xyz * lightAmbient.xyz + emissive.xyz; \n" + " oColor.xyz = lerp(lightingFinal * tex.xyz, fogColour, fogValue); \n" " oColor.a = tex.a * diffuse.a * vertexColour.a; \n" "}"; fragment->setSource(outStream.str());