|
@@ -4,6 +4,8 @@
|
|
private _effect: Effect;
|
|
private _effect: Effect;
|
|
private _cachedDefines: string;
|
|
private _cachedDefines: string;
|
|
|
|
|
|
|
|
+ public zOffset = 1;
|
|
|
|
+
|
|
constructor(scene: Scene) {
|
|
constructor(scene: Scene) {
|
|
this._scene = scene;
|
|
this._scene = scene;
|
|
}
|
|
}
|
|
@@ -40,8 +42,12 @@
|
|
this._effect.setMatrix("diffuseMatrix", alphaTexture.getTextureMatrix());
|
|
this._effect.setMatrix("diffuseMatrix", alphaTexture.getTextureMatrix());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ engine.setZOffset(-this.zOffset);
|
|
|
|
+
|
|
mesh._processRendering(subMesh, this._effect, Material.TriangleFillMode, batch, hardwareInstancedRendering,
|
|
mesh._processRendering(subMesh, this._effect, Material.TriangleFillMode, batch, hardwareInstancedRendering,
|
|
(isInstance, world) => { this._effect.setMatrix("world", world)});
|
|
(isInstance, world) => { this._effect.setMatrix("world", world)});
|
|
|
|
+
|
|
|
|
+ engine.setZOffset(0);
|
|
}
|
|
}
|
|
|
|
|
|
public isReady(subMesh: SubMesh, useInstances: boolean): boolean {
|
|
public isReady(subMesh: SubMesh, useInstances: boolean): boolean {
|