CesiumGS / gltf-pipeline

Content pipeline tools for optimizing glTF assets. :globe_with_meridians:
Apache License 2.0
1.87k stars 241 forks source link

Use fallback textures for base color when no diffuse is given #655

Closed javagl closed 5 months ago

javagl commented 5 months ago

Addresses https://github.com/CesiumGS/cesium/issues/11821 May replace https://github.com/CesiumGS/gltf-pipeline/pull/654

When a KHR_materials_common had the CONSTANT technique, then the resulting PBR material did not contain a base color texture, because the CONSTANT technique did not support diffuse textures. However, it could contain ambient or emissive textures. With the change here, the conversion will try to assign the ambient- or emissive texture as the base color texture when the CONSTANT technique is used.