You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 19:11:41 +00:00
Fix gltf importer forcing vertex colors on all materials
The importer already checks if a mesh has vertex colors and enables vertex colors on the material using it. Before this fix, GLTF importer would force shader generation to use vertex colors even if the scene did not have vertex colors at all, or did not need them; causing inefficient shader and PSO generation.
This commit is contained in:
@@ -3877,7 +3877,6 @@ Error GLTFDocument::_parse_materials(Ref<GLTFState> p_state) {
|
||||
} else {
|
||||
material->set_name(vformat("material_%s", itos(i)));
|
||||
}
|
||||
material->set_flag(BaseMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
|
||||
Dictionary material_extensions;
|
||||
if (material_dict.has("extensions")) {
|
||||
material_extensions = material_dict["extensions"];
|
||||
|
||||
Reference in New Issue
Block a user