mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
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:
parent
b7edf71499
commit
bee2b924bd
1 changed files with 7 additions and 13 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue