Explorar o código

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 %!s(int64=6) %!d(string=hai) anos
pai
achega
de907fea54
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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; }