Browse Source

Set default roughness value if roughnessFactor is not defined

Popov72 5 years ago
parent
commit
d35175cf30
1 changed files with 2 additions and 0 deletions
  1. 2 0
      loaders/src/glTF/2.0/Extensions/KHR_materials_sheen.ts

+ 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;