diff options
author | Anilforextra <anilforextra@gmail.com> | 2021-09-29 09:36:34 +0545 |
---|---|---|
committer | Anilforextra <anilforextra@gmail.com> | 2021-09-29 09:36:34 +0545 |
commit | fc9767abb14348c2236b487f0bc6d18de65a38fd (patch) | |
tree | ef480b9a349b88a51b75296eae844c27a2504469 /modules/gltf/gltf_document.cpp | |
parent | 5aa099aaed359df6ff79fe31616b5601db2a42c5 (diff) | |
download | redot-engine-fc9767abb14348c2236b487f0bc6d18de65a38fd.tar.gz |
Use functions defined in the their classes.
Diffstat (limited to 'modules/gltf/gltf_document.cpp')
-rw-r--r-- | modules/gltf/gltf_document.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 97367b15df..a92eb88edb 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -3757,10 +3757,7 @@ void GLTFDocument::spec_gloss_to_metal_base_color(const Color &p_specular_factor r_base_color.g = Math::lerp(base_color_from_diffuse.g, base_color_from_specular.g, r_metallic * r_metallic); r_base_color.b = Math::lerp(base_color_from_diffuse.b, base_color_from_specular.b, r_metallic * r_metallic); r_base_color.a = p_diffuse.a; - r_base_color.r = CLAMP(r_base_color.r, 0.0f, 1.0f); - r_base_color.g = CLAMP(r_base_color.g, 0.0f, 1.0f); - r_base_color.b = CLAMP(r_base_color.b, 0.0f, 1.0f); - r_base_color.a = CLAMP(r_base_color.a, 0.0f, 1.0f); + r_base_color = r_base_color.clamp(); } GLTFNodeIndex GLTFDocument::_find_highest_node(Ref<GLTFState> state, const Vector<GLTFNodeIndex> &subset) { |