mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-21 19:45:10 +00:00
parent
3e39f5651a
commit
15eb8dd8fc
1 changed files with 8 additions and 5 deletions
|
@ -768,6 +768,14 @@ static float gfx_adjust_x_for_aspect_ratio(float x) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OPTIMIZE_O3 gfx_sp_vertex(size_t n_vertices, size_t dest_index, const Vtx *vertices, bool luaVertexColor) {
|
static void OPTIMIZE_O3 gfx_sp_vertex(size_t n_vertices, size_t dest_index, const Vtx *vertices, bool luaVertexColor) {
|
||||||
|
float globalLightCached[2][3];
|
||||||
|
if (rsp.geometry_mode & G_LIGHTING) {
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
for (int j = 0; j < 3; j++)
|
||||||
|
globalLightCached[i][j] = gLightingColor[i][j] / 255.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __SSE__
|
#ifdef __SSE__
|
||||||
__m128 mat0 = _mm_load_ps(rsp.MP_matrix[0]);
|
__m128 mat0 = _mm_load_ps(rsp.MP_matrix[0]);
|
||||||
__m128 mat1 = _mm_load_ps(rsp.MP_matrix[1]);
|
__m128 mat1 = _mm_load_ps(rsp.MP_matrix[1]);
|
||||||
|
@ -803,11 +811,6 @@ static void OPTIMIZE_O3 gfx_sp_vertex(size_t n_vertices, size_t dest_index, cons
|
||||||
short V = v->tc[1] * rsp.texture_scaling_factor.t >> 16;
|
short V = v->tc[1] * rsp.texture_scaling_factor.t >> 16;
|
||||||
|
|
||||||
if (rsp.geometry_mode & G_LIGHTING) {
|
if (rsp.geometry_mode & G_LIGHTING) {
|
||||||
float globalLightCached[2][3] = {
|
|
||||||
{gLightingColor[0][0] / 255.0f, gLightingColor[0][1] / 255.0f, gLightingColor[0][2] / 255.0f},
|
|
||||||
{gLightingColor[1][0] / 255.0f, gLightingColor[1][1] / 255.0f, gLightingColor[1][2] / 255.0f},
|
|
||||||
};
|
|
||||||
|
|
||||||
if (rsp.lights_changed) {
|
if (rsp.lights_changed) {
|
||||||
bool applyLightingDir = !(rsp.geometry_mode & G_TEXTURE_GEN);
|
bool applyLightingDir = !(rsp.geometry_mode & G_TEXTURE_GEN);
|
||||||
for (int32_t i = 0; i < rsp.current_num_lights - 1; i++) {
|
for (int32_t i = 0; i < rsp.current_num_lights - 1; i++) {
|
||||||
|
|
Loading…
Reference in a new issue