From f1b5cbf993680b33493e032f9bad0d2c821e3bc1 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 2 Jan 2023 11:42:52 -0800 Subject: [PATCH] softgpu: Fix lighting with 0 exp. Broken in #15317. Fixes Kratos scene demo. --- GPU/Software/Lighting.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPU/Software/Lighting.cpp b/GPU/Software/Lighting.cpp index 82315b1b20..88a950d930 100644 --- a/GPU/Software/Lighting.cpp +++ b/GPU/Software/Lighting.cpp @@ -35,6 +35,9 @@ static inline Vec3f GetLightVec(const u32 lparams[12], int light) { } static inline float pspLightPow(float v, float e) { + if (e <= 0.0f) { + return 1.0f; + } if (v > 0.0f) { return pow(v, e); }