From acc884ac0b8ce5b51446871ace4ee55fcf00f1ca Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Sat, 16 Dec 2017 13:10:15 +0700 Subject: [PATCH] Apply Acclaim point lighting for vertices, which also shaded by standard lighting. Fixed #1683 Turok 2: Seeds of Evil (and maybe other Iguana made games) - Object Dynamic Light Issue --- src/gSP.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gSP.cpp b/src/gSP.cpp index 390fdfd0..4a33dd0f 100644 --- a/src/gSP.cpp +++ b/src/gSP.cpp @@ -404,7 +404,7 @@ void gSPLightAcclaim(u32 l, s32 n) gSP.changed |= CHANGED_LIGHT; - DebugMsg(DEBUG_NORMAL, "gSPLightAcclaim( 0x%08X, LIGHT_%i );\n", l, n); + DebugMsg(DEBUG_NORMAL, "gSPLightAcclaim( 0x%08X, LIGHT_%i ca=%f la=%f);\n", l, n, gSP.lights.ca[n], gSP.lights.la[n]); } void gSPLookAt( u32 _l, u32 _n ) @@ -822,6 +822,9 @@ void gSPProcessVertex(u32 v, SPVertex * spVtx) else gSPLightVertex(v, spVtx); + if (gSP.geometryMode & G_ACCLAIM_LIGHTING) + gSPPointLightVertexAcclaim(v, spVtx); + if ((gSP.geometryMode & G_TEXTURE_GEN) != 0) { if (GBI.getMicrocodeType() != F3DFLX2) { for(int i = 0; i < VNUM; ++i) {