Bladeren bron

Proposed fix to issue #6103, changed exporter conditional for reversing mesh winding to reverse whether in LHR coordinate system or if material has Clockwise Side orientation

Nick Barlow 6 jaren geleden
bovenliggende
commit
de907fea54
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      serializers/src/glTF/2.0/glTFExporter.ts

+ 1 - 1
serializers/src/glTF/2.0/glTFExporter.ts

@@ -1195,7 +1195,7 @@ export class _Exporter {
                     if (materialIndex != null && Object.keys(meshPrimitive.attributes).length > 0) {
                         let sideOrientation = babylonMaterial.sideOrientation;
 
-                        if (this._convertToRightHandedSystem && sideOrientation === Material.ClockWiseSideOrientation) {
+                        if (this._convertToRightHandedSystem || sideOrientation === Material.ClockWiseSideOrientation) {
                             //Overwrite the indices to be counter-clockwise
                             let byteOffset = indexBufferViewIndex != null ? this._bufferViews[indexBufferViewIndex].byteOffset : null;
                             if (byteOffset == null) { byteOffset = 0; }