|
@@ -247,7 +247,7 @@ void PS(
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef AMBIENT
|
|
#ifdef AMBIENT
|
|
|
- finalColor += cAmbientColor * diffColor.rgb;
|
|
|
|
|
|
|
+ finalColor += cAmbientColor.rgb * diffColor.rgb;
|
|
|
finalColor += cMatEmissiveColor;
|
|
finalColor += cMatEmissiveColor;
|
|
|
oColor = float4(GetFog(finalColor, fogFactor), diffColor.a);
|
|
oColor = float4(GetFog(finalColor, fogFactor), diffColor.a);
|
|
|
#else
|
|
#else
|
|
@@ -267,7 +267,7 @@ void PS(
|
|
|
float3 finalColor = iVertexLight * diffColor.rgb;
|
|
float3 finalColor = iVertexLight * diffColor.rgb;
|
|
|
#ifdef AO
|
|
#ifdef AO
|
|
|
// If using AO, the vertex light ambient is black, calculate occluded ambient here
|
|
// If using AO, the vertex light ambient is black, calculate occluded ambient here
|
|
|
- finalColor += Sample2D(EmissiveMap, iTexCoord2).rgb * cAmbientColor * diffColor.rgb;
|
|
|
|
|
|
|
+ finalColor += Sample2D(EmissiveMap, iTexCoord2).rgb * cAmbientColor.rgb * diffColor.rgb;
|
|
|
#endif
|
|
#endif
|
|
|
#ifdef ENVCUBEMAP
|
|
#ifdef ENVCUBEMAP
|
|
|
finalColor += cMatEnvMapColor * SampleCube(EnvCubeMap, reflect(iReflectionVec, normal)).rgb;
|
|
finalColor += cMatEnvMapColor * SampleCube(EnvCubeMap, reflect(iReflectionVec, normal)).rgb;
|
|
@@ -290,7 +290,7 @@ void PS(
|
|
|
float3 finalColor = iVertexLight * diffColor.rgb;
|
|
float3 finalColor = iVertexLight * diffColor.rgb;
|
|
|
#ifdef AO
|
|
#ifdef AO
|
|
|
// If using AO, the vertex light ambient is black, calculate occluded ambient here
|
|
// If using AO, the vertex light ambient is black, calculate occluded ambient here
|
|
|
- finalColor += Sample2D(EmissiveMap, iTexCoord2).rgb * cAmbientColor * diffColor.rgb;
|
|
|
|
|
|
|
+ finalColor += Sample2D(EmissiveMap, iTexCoord2).rgb * cAmbientColor.rgb * diffColor.rgb;
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef MATERIAL
|
|
#ifdef MATERIAL
|