Fix #118634: EEVEE: Set clip threshold per material
Pull Request: https://projects.blender.org/blender/blender/pulls/118681
This commit is contained in:
@@ -526,6 +526,8 @@ BLI_INLINE void material_shadow(EEVEE_Data *vedata,
|
||||
/* This GPUShader has already been used by another material.
|
||||
* Add new shading group just after to avoid shader switching cost. */
|
||||
grp = DRW_shgroup_create_sub(*grp_p);
|
||||
/* Per material uniforms. */
|
||||
DRW_shgroup_uniform_float_copy(grp, "alphaClipThreshold", alpha_clip_threshold);
|
||||
}
|
||||
else {
|
||||
*grp_p = grp = DRW_shgroup_create(sh, psl->shadow_pass);
|
||||
@@ -606,6 +608,8 @@ static EeveeMaterialCache material_opaque(EEVEE_Data *vedata,
|
||||
/* This GPUShader has already been used by another material.
|
||||
* Add new shading group just after to avoid shader switching cost. */
|
||||
grp = DRW_shgroup_create_sub(*grp_p);
|
||||
/* Per material uniforms. */
|
||||
DRW_shgroup_uniform_float_copy(grp, "alphaClipThreshold", alpha_clip_threshold);
|
||||
}
|
||||
else {
|
||||
*grp_p = grp = DRW_shgroup_create(sh, depth_ps);
|
||||
@@ -653,6 +657,7 @@ static EeveeMaterialCache material_opaque(EEVEE_Data *vedata,
|
||||
grp = DRW_shgroup_create_sub(*grp_p);
|
||||
|
||||
/* Per material uniforms. */
|
||||
DRW_shgroup_uniform_float_copy(grp, "alphaClipThreshold", alpha_clip_threshold);
|
||||
if (use_ssrefract) {
|
||||
DRW_shgroup_uniform_float_copy(grp, "refractionDepth", ma->refract_depth);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user