mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-24 03:39:07 +02:00
Don't calculate lighting when not enabled.
We just ignore it anyway. 2% improvement in Tales of Phantasia X.
This commit is contained in:
1 parent
2240cae3bf
commit
a414abfe4a
1 file changed
+4
-3
@@ -398,11 +398,12 @@ void TransformDrawEngine::SoftwareTransformAndDraw(
|
||||
} else {
|
||||
unlitColor = Vec4f::FromRGBA(gstate.getMaterialAmbientRGBA());
|
||||
}
|
||||
float litColor0[4];
|
||||
float litColor1[4];
|
||||
lighter.Light(litColor0, litColor1, unlitColor.AsArray(), out, normal);
|
||||
|
||||
if (gstate.isLightingEnabled()) {
|
||||
float litColor0[4];
|
||||
float litColor1[4];
|
||||
lighter.Light(litColor0, litColor1, unlitColor.AsArray(), out, normal);
|
||||
|
||||
// Don't ignore gstate.lmode - we should send two colors in that case
|
||||
for (int j = 0; j < 4; j++) {
|
||||
c0[j] = litColor0[j];
|
||||
|
||||
Reference in new issue
Block a user