mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
GLTF: Always read alphaCutoff property
This commit is contained in:
parent
2582793d40
commit
ec7d7abde9
1 changed files with 5 additions and 5 deletions
|
|
@ -4822,13 +4822,13 @@ Error GLTFDocument::_parse_materials(Ref<GLTFState> p_state) {
|
|||
material->set_transparency(BaseMaterial3D::TRANSPARENCY_ALPHA_DEPTH_PRE_PASS);
|
||||
} else if (am == "MASK") {
|
||||
material->set_transparency(BaseMaterial3D::TRANSPARENCY_ALPHA_SCISSOR);
|
||||
if (material_dict.has("alphaCutoff")) {
|
||||
material->set_alpha_scissor_threshold(material_dict["alphaCutoff"]);
|
||||
} else {
|
||||
material->set_alpha_scissor_threshold(0.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (material_dict.has("alphaCutoff")) {
|
||||
material->set_alpha_scissor_threshold(material_dict["alphaCutoff"]);
|
||||
} else {
|
||||
material->set_alpha_scissor_threshold(0.5f);
|
||||
}
|
||||
|
||||
if (material_dict.has("extras")) {
|
||||
_attach_extras_to_meta(material_dict["extras"], material);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue