mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-22 08:44:51 +00:00
Correct ambient light
This commit is contained in:
parent
9027e5018b
commit
de7c1ef327
@ -348,7 +348,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -381,7 +381,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) * lightScale%i);\n", i, specular, i, i);
|
||||
}
|
||||
WRITE(p, " lightSum0 += vec4((u_lightambient%i + diffuse%i)*lightScale%i, 0.0);\n", i, i, i);
|
||||
WRITE(p, " lightSum0 += vec4((u_lightambient%i * %s + diffuse%i)*lightScale%i, 0.0);\n", i, ambient, i, i);
|
||||
}
|
||||
|
||||
if (gstate.isLightingEnabled()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user