Browse Source

Set default roughness value if roughnessFactor is not defined

Popov72 5 năm trước cách đây
mục cha
commit
d35175cf30
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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;