From 2bd87d1a8834489b5899be55bd57ab74f3dcccb3 Mon Sep 17 00:00:00 2001 From: BielBdeLuna <7318.tk@gmail.com> Date: Tue, 29 Jul 2014 12:10:43 +0200 Subject: [PATCH] ambient fix works --- base/renderprogs/interactionAmbient.pixel | 2 +- base/renderprogs/interactionAmbient_skinned.pixel | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/renderprogs/interactionAmbient.pixel b/base/renderprogs/interactionAmbient.pixel index e7e05972..c2cd38de 100644 --- a/base/renderprogs/interactionAmbient.pixel +++ b/base/renderprogs/interactionAmbient.pixel @@ -71,7 +71,7 @@ void main( PS_IN fragment, out PS_OUT result ) { half3 diffuseColor = diffuseMap * rpDiffuseModifier.xyz; half3 specularColor = specMap.xyz * specularContribution * rpSpecularModifier.xyz; - half3 lightColor = dot3( lightVector, localNormal ) * lightProj.xyz * lightFalloff.xyz; + half3 lightColor = lightProj.xyz * lightFalloff.xyz; // ambient fix result.color.xyz = ( diffuseColor + specularColor ) * lightColor * fragment.color.xyz; result.color.w = 1.0; diff --git a/base/renderprogs/interactionAmbient_skinned.pixel b/base/renderprogs/interactionAmbient_skinned.pixel index e7e05972..c2cd38de 100644 --- a/base/renderprogs/interactionAmbient_skinned.pixel +++ b/base/renderprogs/interactionAmbient_skinned.pixel @@ -71,7 +71,7 @@ void main( PS_IN fragment, out PS_OUT result ) { half3 diffuseColor = diffuseMap * rpDiffuseModifier.xyz; half3 specularColor = specMap.xyz * specularContribution * rpSpecularModifier.xyz; - half3 lightColor = dot3( lightVector, localNormal ) * lightProj.xyz * lightFalloff.xyz; + half3 lightColor = lightProj.xyz * lightFalloff.xyz; // ambient fix result.color.xyz = ( diffuseColor + specularColor ) * lightColor * fragment.color.xyz; result.color.w = 1.0;