summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-08-17 18:26:57 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-08-17 18:33:59 -0300
commit3a4ff3402dedab5f30b0f97aeadec6cf61f29a40 (patch)
tree6d44198ad822c8f12ce511fc7249d12daf1d95a2 /scene/resources
parentee59e627ded8c9d0a3d2d33b2d6cc6734a62b04d (diff)
Oops, fixed wrong color masking problem. Closes #10149
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/material.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index bc23a41ede..a111f64e06 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -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));
}