|
@@ -1384,7 +1384,7 @@ static Plane _get_texture_mask(SpatialMaterial::TextureChannel p_channel) {
|
|
|
}
|
|
|
|
|
|
void SpatialMaterial::set_metallic_texture_channel(TextureChannel p_channel) {
|
|
|
-
|
|
|
+ ERR_FAIL_INDEX(p_channel, 5);
|
|
|
metallic_texture_channel = p_channel;
|
|
|
VS::get_singleton()->material_set_param(_get_material(), shader_names->metallic_texture_channel, _get_texture_mask(p_channel));
|
|
|
}
|
|
@@ -1395,6 +1395,7 @@ SpatialMaterial::TextureChannel SpatialMaterial::get_metallic_texture_channel()
|
|
|
|
|
|
void SpatialMaterial::set_roughness_texture_channel(TextureChannel p_channel) {
|
|
|
|
|
|
+ ERR_FAIL_INDEX(p_channel, 5);
|
|
|
roughness_texture_channel = p_channel;
|
|
|
VS::get_singleton()->material_set_param(_get_material(), shader_names->roughness_texture_channel, _get_texture_mask(p_channel));
|
|
|
}
|