Fixed do_multiply optimization

This commit is contained in:
MysterD 2023-04-27 12:28:39 -07:00
parent e945eb9572
commit d84be97157
3 changed files with 5 additions and 2 deletions

View file

@ -561,7 +561,9 @@ static void geo_process_camera(struct GraphNodeCamera *node) {
if (!increment_mat_stack()) { return; }
// save the camera matrix
if (gCamera) {
mtxf_copy(gCamera->mtx, gMatStack[gMatStackIndex]);
}
if (node->fnNode.node.children != 0) {
gCurGraphNodeCamera = node;

View file

@ -266,7 +266,7 @@ static struct ShaderProgram *gfx_opengl_create_and_load_new_shader(struct ColorC
for (int i = 0; i < 16 / 4; i++) {
u8* c = &cc->shader_commands[i * 4];
do_single[i] = (c[2] == 0);
do_multiply[i] = (c[1] == c[3]);
do_multiply[i] = (c[1] == 0 && c[3] == 0);
do_mix[i] = (c[1] == c[3]);
}

View file

@ -335,6 +335,7 @@ static struct ColorCombiner *gfx_lookup_or_create_color_combiner(struct CombineM
struct ColorCombiner *comb = &color_combiner_pool[color_combiner_pool_size++];
comb->cm = *cm;
gfx_generate_cc(comb);
return prev_combiner = comb;
}