|
@@ -742,6 +742,7 @@ export class GLTFLoader implements IGLTFLoader {
|
|
|
const promises = new Array<Promise<any>>();
|
|
|
|
|
|
const babylonMesh = new Mesh(name, this._babylonScene);
|
|
|
+ babylonMesh.overrideMaterialSideOrientation = this._babylonScene.useRightHandedSystem ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation;
|
|
|
|
|
|
this._createMorphTargets(context, node, mesh, primitive, babylonMesh);
|
|
|
promises.push(this._loadVertexDataAsync(context, primitive, babylonMesh).then((babylonGeometry) => {
|
|
@@ -1644,7 +1645,7 @@ export class GLTFLoader implements IGLTFLoader {
|
|
|
|
|
|
private _createDefaultMaterial(name: string, babylonDrawMode: number): Material {
|
|
|
const babylonMaterial = new PBRMaterial(name, this._babylonScene);
|
|
|
- babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation;
|
|
|
+ // Moved to mesh so user can change materials on gltf meshes: babylonMaterial.sideOrientation = this._babylonScene.useRightHandedSystem ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation;
|
|
|
babylonMaterial.fillMode = babylonDrawMode;
|
|
|
babylonMaterial.enableSpecularAntiAliasing = true;
|
|
|
babylonMaterial.useRadianceOverAlpha = !this._parent.transparencyAsCoverage;
|