Cleanup: DRW: remove uneeded double bind

Now that binds are permanent there is no need to setup the same
texture for each subgroups.
This commit is contained in:
Clément Foucault 2020-07-16 01:20:25 +02:00
parent 56b8adb9e2
commit bc85081156
2 changed files with 0 additions and 9 deletions

View File

@ -525,12 +525,6 @@ static void gpencil_stroke_cache_populate(bGPDlayer *gpl,
DRW_shgroup_uniform_texture(iter->grp, "gpStrokeTexture", tex_stroke);
iter->tex_stroke = tex_stroke;
}
/* TODO(fclem): This is a quick workaround but
* ideally we should have this as a permanent bind. */
const bool is_masked = iter->tgp_ob->layers.last->mask_bits != NULL;
GPUTexture **mask_tex = (is_masked) ? &iter->pd->mask_tx : &iter->pd->dummy_tx;
DRW_shgroup_uniform_texture_ref(iter->grp, "gpMaskTexture", mask_tex);
}
bool do_sbuffer = (iter->do_sbuffer_call == DRAW_NOW);

View File

@ -102,12 +102,9 @@ void OVERLAY_wireframe_cache_init(OVERLAY_Data *vedata)
DRW_shgroup_uniform_bool_copy(grp, "isHair", false);
pd->wires_all_grp[xray][use_coloring] = grp = DRW_shgroup_create(wires_sh, pass);
DRW_shgroup_uniform_texture_ref(grp, "depthTex", depth_tx);
DRW_shgroup_uniform_float_copy(grp, "wireStepParam", 1.0f);
pd->wires_hair_grp[xray][use_coloring] = grp = DRW_shgroup_create(wires_sh, pass);
/* TODO(fclem) texture ref persist */
DRW_shgroup_uniform_texture_ref(grp, "depthTex", depth_tx);
DRW_shgroup_uniform_bool_copy(grp, "isHair", true);
DRW_shgroup_uniform_float_copy(grp, "wireStepParam", 10.0f);
}