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:
parent
56b8adb9e2
commit
bc85081156
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue