소스 검색

Merge pull request #4803 from kcoley/glTFSerializerFixAlphaCalculationBug

fixed alpha calculation bug
David Catuhe 7 년 전
부모
커밋
b486d2aa08
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      serializers/src/glTF/2.0/babylon.glTFMaterialExporter.ts

+ 1 - 1
serializers/src/glTF/2.0/babylon.glTFMaterialExporter.ts

@@ -685,7 +685,7 @@ module BABYLON.GLTF2 {
                         baseColorBuffer[offset] = metallicRoughness.baseColor.r * 255;
                         baseColorBuffer[offset + 1] = metallicRoughness.baseColor.g * 255;
                         baseColorBuffer[offset + 2] = metallicRoughness.baseColor.b * 255;
-                        baseColorBuffer[offset + 3] = resizedTextures.texture1.hasAlpha ? diffuseBuffer[offset + 3] : 255;
+                        baseColorBuffer[offset + 3] = resizedTextures.texture1.hasAlpha ? diffuseBuffer[offset + 3] * 255 : 255;
 
                         metallicRoughnessBuffer[offset] = 0;
                         metallicRoughnessBuffer[offset + 1] = metallicRoughness.roughness * 255;