ParticlesMaterial: Simplify PARAM_SCALE texture validation
Using the same helper method as other param textures.
This commit is contained in:
parent
b2f96b2892
commit
4e5ef43dbb
@ -797,12 +797,7 @@ void ParticlesMaterial::set_param_texture(Parameter p_param, const Ref<Texture>
|
|||||||
} break;
|
} break;
|
||||||
case PARAM_SCALE: {
|
case PARAM_SCALE: {
|
||||||
VisualServer::get_singleton()->material_set_param(_get_material(), shader_names->scale_texture, p_texture);
|
VisualServer::get_singleton()->material_set_param(_get_material(), shader_names->scale_texture, p_texture);
|
||||||
|
_adjust_curve_range(p_texture, 0, 1);
|
||||||
Ref<CurveTexture> curve_tex = p_texture;
|
|
||||||
if (curve_tex.is_valid()) {
|
|
||||||
curve_tex->ensure_default_setup();
|
|
||||||
}
|
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case PARAM_HUE_VARIATION: {
|
case PARAM_HUE_VARIATION: {
|
||||||
VisualServer::get_singleton()->material_set_param(_get_material(), shader_names->hue_variation_texture, p_texture);
|
VisualServer::get_singleton()->material_set_param(_get_material(), shader_names->hue_variation_texture, p_texture);
|
||||||
|
Loading…
Reference in New Issue
Block a user