mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 14:30:27 +02:00
Merge pull request #2088 from unknownbrackets/gpu-lighting
Multiply by the base color in ambient lighting.
This commit is contained in:
commit
417ccb576c
2 files changed
+2
-2
No files matched your search
@@ -350,7 +350,7 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[
|
||||
if (gstate.lightEnable[l] & 1)
|
||||
{
|
||||
Color4 lightAmbient(gstate_c.lightColor[0][l], 0.0f);
|
||||
lightSum0 += (lightAmbient + diff) * lightScale;
|
||||
lightSum0 += (lightAmbient * *ambient + diff) * lightScale;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -476,7 +476,7 @@ void GenerateVertexShader(int prim, char *buffer) {
|
||||
WRITE(p, " if (dot%i > 0.0)\n", i);
|
||||
WRITE(p, " lightSum1 += u_lightspecular%i * %s * (pow(dot%i, u_matspecular.a) %s);\n", i, specularStr, i, timesLightScale);
|
||||
}
|
||||
WRITE(p, " lightSum0.rgb += (u_lightambient%i + diffuse)%s;\n", i, timesLightScale);
|
||||
WRITE(p, " lightSum0.rgb += (u_lightambient%i * %s.rgb + diffuse)%s;\n", i, ambientStr, timesLightScale);
|
||||
}
|
||||
|
||||
if (gstate.isLightingEnabled()) {
|
||||
|
||||
Reference in new issue
Block a user