Make lightmapped graphics ignore lighting engine (#1025)

The dynamic lighting engine conflicted with lightmapped graphics. Now
lightmapped graphics will ignore the lighting engine. Making them work
together is something for the future.

Co-authored-by: MysterD <myster@d>
This commit is contained in:
djoslin0 2025-11-19 17:40:46 -08:00 committed by GitHub
parent a164caa412
commit a3bfd4a740
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -730,7 +730,7 @@ static void OPTIMIZE_O3 gfx_sp_vertex(size_t n_vertices, size_t dest_index, cons
Vec3f globalLightCached[2];
Vec3f vertexColorCached;
if (rsp.geometry_mode & G_LIGHTING) {
if ((rsp.geometry_mode & G_LIGHTING) && !(rsp.geometry_mode & G_LIGHT_MAP_EXT)) {
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 3; j++)
globalLightCached[i][j] = gLightingColor[i][j] / 255.0f;
@ -911,7 +911,7 @@ static void OPTIMIZE_O3 gfx_sp_vertex(size_t n_vertices, size_t dest_index, cons
d->color.b *= color[2] / 255.0f;
}
// if lighting engine is enabled and we should affect all vertex colored surfaces or the lighting engine geometry mode is on
} else if (le_is_enabled() && (affectAllVertexColored || (rsp.geometry_mode & G_LIGHTING_ENGINE_EXT))) {
} else if (le_is_enabled() && !(rsp.geometry_mode & G_LIGHT_MAP_EXT) && (affectAllVertexColored || (rsp.geometry_mode & G_LIGHTING_ENGINE_EXT))) {
Color color = { gLEAmbientColor[0], gLEAmbientColor[1], gLEAmbientColor[2] };
CTX_BEGIN(CTX_LIGHTING);