Skip to content

Commit bdf625b

Browse files
committed
Merge pull request #101051 from aaronfranke/gltf-always-read-alpha-cutoff
GLTF: Always read `alphaCutoff` property
2 parents c3c0c24 + ec7d7ab commit bdf625b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/gltf/gltf_document.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -4822,13 +4822,13 @@ Error GLTFDocument::_parse_materials(Ref<GLTFState> p_state) {
48224822
material->set_transparency(BaseMaterial3D::TRANSPARENCY_ALPHA_DEPTH_PRE_PASS);
48234823
} else if (am == "MASK") {
48244824
material->set_transparency(BaseMaterial3D::TRANSPARENCY_ALPHA_SCISSOR);
4825-
if (material_dict.has("alphaCutoff")) {
4826-
material->set_alpha_scissor_threshold(material_dict["alphaCutoff"]);
4827-
} else {
4828-
material->set_alpha_scissor_threshold(0.5f);
4829-
}
48304825
}
48314826
}
4827+
if (material_dict.has("alphaCutoff")) {
4828+
material->set_alpha_scissor_threshold(material_dict["alphaCutoff"]);
4829+
} else {
4830+
material->set_alpha_scissor_threshold(0.5f);
4831+
}
48324832

48334833
if (material_dict.has("extras")) {
48344834
_attach_extras_to_meta(material_dict["extras"], material);

0 commit comments

Comments
 (0)