@onerjs/core 8.27.0 → 8.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1032,7 +1032,7 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
1032
1032
  ...(this._eventInfo.defineNames || {}),
1033
1033
  ...(this._samplerDefines || {}),
1034
1034
  });
1035
- const effect = this._prepareEffect(mesh, defines, undefined, undefined, localOptions.useInstances, localOptions.clipPlane, mesh.hasThinInstances);
1035
+ const effect = this._prepareEffect(mesh, mesh, defines, undefined, undefined, localOptions.useInstances, localOptions.clipPlane);
1036
1036
  if (this._onEffectCreatedObservable) {
1037
1037
  onCreatedEffectParameters.effect = effect;
1038
1038
  onCreatedEffectParameters.subMesh = null;
@@ -1153,7 +1153,7 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
1153
1153
  }
1154
1154
  const previousEffect = subMesh.effect;
1155
1155
  const lightDisposed = defines._areLightsDisposed;
1156
- let effect = this._prepareEffect(mesh, defines, this.onCompiled, this.onError, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);
1156
+ let effect = this._prepareEffect(mesh, subMesh.getRenderingMesh(), defines, this.onCompiled, this.onError, useInstances, null);
1157
1157
  let forceWasNotReadyPreviously = false;
1158
1158
  if (effect) {
1159
1159
  if (this._onEffectCreatedObservable) {
@@ -1462,8 +1462,8 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
1462
1462
  }
1463
1463
  return this.getScene().environmentTexture;
1464
1464
  }
1465
- _prepareEffect(mesh, defines, onCompiled = null, onError = null, useInstances = null, useClipPlane = null, useThinInstances) {
1466
- this._prepareDefines(mesh, defines, useInstances, useClipPlane, useThinInstances);
1465
+ _prepareEffect(mesh, renderingMesh, defines, onCompiled = null, onError = null, useInstances = null, useClipPlane = null) {
1466
+ this._prepareDefines(mesh, renderingMesh, defines, useInstances, useClipPlane);
1467
1467
  if (!defines.isDirty) {
1468
1468
  return null;
1469
1469
  }
@@ -1650,7 +1650,8 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
1650
1650
  this._eventInfo.customCode = undefined;
1651
1651
  return effect;
1652
1652
  }
1653
- _prepareDefines(mesh, defines, useInstances = null, useClipPlane = null, useThinInstances = false) {
1653
+ _prepareDefines(mesh, renderingMesh, defines, useInstances = null, useClipPlane = null) {
1654
+ const useThinInstances = renderingMesh.hasThinInstances;
1654
1655
  const scene = this.getScene();
1655
1656
  const engine = scene.getEngine();
1656
1657
  // Lights
@@ -1789,7 +1790,7 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
1789
1790
  }
1790
1791
  // Misc.
1791
1792
  if (defines._areMiscDirty) {
1792
- PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this.needAlphaTestingForMesh(mesh), defines, this._applyDecalMapAfterDetailMap);
1793
+ PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this.needAlphaTestingForMesh(mesh), defines, this._applyDecalMapAfterDetailMap, this._useVertexPulling, renderingMesh, this._setVertexOutputInvariant);
1793
1794
  defines.UNLIT = this._unlit || ((this.pointsCloud || this.wireframe) && !mesh.isVerticesDataPresent(VertexBuffer.NormalKind));
1794
1795
  defines.DEBUGMODE = this._debugMode;
1795
1796
  }