disable lua vertex colors for G_PACKED_NORMALS_EXT

by maniscat2

Co-Authored-By: ManIsCat2 <137772623+ManIsCat2@users.noreply.github.com>
This commit is contained in:
Isaac0-dev 2025-06-09 19:02:47 +10:00
parent b7edf71499
commit bee2b924bd

View file

@ -691,7 +691,7 @@ static void OPTIMIZE_O3 gfx_sp_vertex(size_t n_vertices, size_t dest_index, cons
} }
if (luaVertexColor) { if (luaVertexColor) {
if ((rsp.geometry_mode & G_PACKED_NORMALS_EXT) || (!(rsp.geometry_mode & G_LIGHTING))) { if (!(rsp.geometry_mode & G_LIGHTING)) {
for (int i = 0; i < 3; i ++) { for (int i = 0; i < 3; i ++) {
vertexColorCached[i] = gVertexColor[i] / 255.0f; vertexColorCached[i] = gVertexColor[i] / 255.0f;
} }
@ -796,16 +796,10 @@ static void OPTIMIZE_O3 gfx_sp_vertex(size_t n_vertices, size_t dest_index, cons
float vtxR = (v->cn[0] / 255.0f); float vtxR = (v->cn[0] / 255.0f);
float vtxG = (v->cn[1] / 255.0f); float vtxG = (v->cn[1] / 255.0f);
float vtxB = (v->cn[2] / 255.0f); float vtxB = (v->cn[2] / 255.0f);
if (luaVertexColor) {
d->color.r *= vtxR * vertexColorCached[0];
d->color.g *= vtxG * vertexColorCached[1];
d->color.b *= vtxB * vertexColorCached[2];
} else {
d->color.r *= vtxR; d->color.r *= vtxR;
d->color.g *= vtxG; d->color.g *= vtxG;
d->color.b *= vtxB; d->color.b *= vtxB;
} }
}
if (rsp.geometry_mode & G_TEXTURE_GEN) { if (rsp.geometry_mode & G_TEXTURE_GEN) {
float dotx = 0, doty = 0; float dotx = 0, doty = 0;