Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit a01548f

Browse files
authored
[Impeller Scene] Fix material/vertex color overlapping (#38653)
1 parent b9b0193 commit a01548f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

impeller/scene/material.cc

+5-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ std::unique_ptr<UnlitMaterial> UnlitMaterial::MakeFromFlatbuffer(
7979

8080
auto result = Material::MakeUnlit();
8181

82-
result->SetColor(material.base_color_factor()
83-
? importer::ToColor(*material.base_color_factor())
84-
: Color::White());
82+
if (material.base_color_factor()) {
83+
result->SetColor(importer::ToColor(*material.base_color_factor()));
84+
result->SetVertexColorWeight(0);
85+
}
86+
8587
if (material.base_color_texture() >= 0 &&
8688
material.base_color_texture() < static_cast<int32_t>(textures.size())) {
8789
result->SetColorTexture(textures[material.base_color_texture()]);

0 commit comments

Comments
 (0)