Ver código fonte

Set default roughness value if roughnessFactor is not defined

Popov72 5 anos atrás
pai
commit
d35175cf30

+ 2 - 0
loaders/src/glTF/2.0/Extensions/KHR_materials_sheen.ts

@@ -89,6 +89,8 @@ export class KHR_materials_sheen implements IGLTFLoaderExtension {
 
         if (properties.roughnessFactor !== undefined) {
             babylonMaterial.sheen.roughness = properties.roughnessFactor;
+        } else {
+            babylonMaterial.sheen.roughness = 0;
         }
 
         babylonMaterial.sheen.albedoScaling = true;