Oops, fixed wrong color masking problem. Closes #10149
This commit is contained in:
parent
ee59e627de
commit
3a4ff3402d
2 changed files with 3 additions and 2 deletions
|
@ -2143,7 +2143,7 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
|
||||||
|
|
||||||
gui[0] = v.normal.x;
|
gui[0] = v.normal.x;
|
||||||
gui[1] = v.normal.y;
|
gui[1] = v.normal.y;
|
||||||
gui[2] = v.normal.x;
|
gui[2] = v.normal.z;
|
||||||
gui[3] = v.d;
|
gui[3] = v.d;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
|
@ -1384,7 +1384,7 @@ static Plane _get_texture_mask(SpatialMaterial::TextureChannel p_channel) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpatialMaterial::set_metallic_texture_channel(TextureChannel p_channel) {
|
void SpatialMaterial::set_metallic_texture_channel(TextureChannel p_channel) {
|
||||||
|
ERR_FAIL_INDEX(p_channel, 5);
|
||||||
metallic_texture_channel = p_channel;
|
metallic_texture_channel = p_channel;
|
||||||
VS::get_singleton()->material_set_param(_get_material(), shader_names->metallic_texture_channel, _get_texture_mask(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) {
|
void SpatialMaterial::set_roughness_texture_channel(TextureChannel p_channel) {
|
||||||
|
|
||||||
|
ERR_FAIL_INDEX(p_channel, 5);
|
||||||
roughness_texture_channel = p_channel;
|
roughness_texture_channel = p_channel;
|
||||||
VS::get_singleton()->material_set_param(_get_material(), shader_names->roughness_texture_channel, _get_texture_mask(p_channel));
|
VS::get_singleton()->material_set_param(_get_material(), shader_names->roughness_texture_channel, _get_texture_mask(p_channel));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue