|
@@ -24905,13 +24905,25 @@ var BABYLON;
|
|
|
if (options.clipPlane) {
|
|
|
scene.clipPlane = new BABYLON.Plane(0, 0, 0, 1);
|
|
|
}
|
|
|
- if (_this.isReadyForSubMesh(mesh, subMesh)) {
|
|
|
- if (onCompiled) {
|
|
|
- onCompiled(_this);
|
|
|
+ if (_this.storeEffectOnSubMeshes) {
|
|
|
+ if (_this.isReadyForSubMesh(mesh, subMesh)) {
|
|
|
+ if (onCompiled) {
|
|
|
+ onCompiled(_this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ setTimeout(checkReady, 16);
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- setTimeout(checkReady, 16);
|
|
|
+ if (_this.isReady(mesh)) {
|
|
|
+ if (onCompiled) {
|
|
|
+ onCompiled(_this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ setTimeout(checkReady, 16);
|
|
|
+ }
|
|
|
}
|
|
|
engine.setAlphaTesting(alphaTestState);
|
|
|
if (options.clipPlane) {
|
|
@@ -48843,7 +48855,7 @@ var BABYLON;
|
|
|
for (var index = 0; index < this.subMaterials.length; index++) {
|
|
|
var subMaterial = this.subMaterials[index];
|
|
|
if (subMaterial) {
|
|
|
- if (this.subMaterials[index].isReadyForSubMesh) {
|
|
|
+ if (this.subMaterials[index].storeEffectOnSubMeshes) {
|
|
|
if (!this.subMaterials[index].isReadyForSubMesh(mesh, subMesh, useInstances)) {
|
|
|
return false;
|
|
|
}
|