@babylonjs/core 5.42.2 → 5.43.0
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.
- package/Actions/actionManager.js +18 -13
- package/Actions/actionManager.js.map +1 -1
- package/Audio/sound.js +8 -4
- package/Audio/sound.js.map +1 -1
- package/Behaviors/Meshes/handConstraintBehavior.d.ts +2 -1
- package/Behaviors/Meshes/handConstraintBehavior.js +15 -8
- package/Behaviors/Meshes/handConstraintBehavior.js.map +1 -1
- package/Engines/IPipelineContext.d.ts +54 -0
- package/Engines/IPipelineContext.js.map +1 -1
- package/Engines/Native/nativePipelineContext.d.ts +54 -0
- package/Engines/Native/nativePipelineContext.js +92 -0
- package/Engines/Native/nativePipelineContext.js.map +1 -1
- package/Engines/WebGL/webGLPipelineContext.d.ts +54 -0
- package/Engines/WebGL/webGLPipelineContext.js +6 -2
- package/Engines/WebGL/webGLPipelineContext.js.map +1 -1
- package/Engines/WebGPU/webgpuPipelineContext.d.ts +54 -0
- package/Engines/WebGPU/webgpuPipelineContext.js +85 -0
- package/Engines/WebGPU/webgpuPipelineContext.js.map +1 -1
- package/Engines/thinEngine.d.ts +62 -0
- package/Engines/thinEngine.js +112 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.js +8 -4
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/htmlElementTexture.js +1 -1
- package/Materials/Textures/htmlElementTexture.js.map +1 -1
- package/Materials/Textures/texture.js +1 -0
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/effect.d.ts +68 -0
- package/Materials/effect.js +9 -2
- package/Materials/effect.js.map +1 -1
- package/Materials/material.d.ts +2 -1
- package/Materials/material.js +10 -1
- package/Materials/material.js.map +1 -1
- package/Materials/pushMaterial.js +3 -0
- package/Materials/pushMaterial.js.map +1 -1
- package/Materials/shaderMaterial.d.ts +8 -0
- package/Materials/shaderMaterial.js +29 -0
- package/Materials/shaderMaterial.js.map +1 -1
- package/Materials/standardMaterial.js +6 -3
- package/Materials/standardMaterial.js.map +1 -1
- package/Materials/uniformBuffer.d.ts +41 -0
- package/Materials/uniformBuffer.js +53 -1
- package/Materials/uniformBuffer.js.map +1 -1
- package/XR/webXRCamera.d.ts +0 -1
- package/XR/webXRCamera.js +0 -4
- package/XR/webXRCamera.js.map +1 -1
- package/package.json +1 -1
|
@@ -911,6 +911,7 @@ export class PBRBaseMaterial extends PushMaterial {
|
|
|
911
911
|
const previousEffect = subMesh.effect;
|
|
912
912
|
const lightDisposed = defines._areLightsDisposed;
|
|
913
913
|
let effect = this._prepareEffect(mesh, defines, this.onCompiled, this.onError, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);
|
|
914
|
+
let forceWasNotReadyPreviously = false;
|
|
914
915
|
if (effect) {
|
|
915
916
|
if (this._onEffectCreatedObservable) {
|
|
916
917
|
onCreatedEffectParameters.effect = effect;
|
|
@@ -921,6 +922,7 @@ export class PBRBaseMaterial extends PushMaterial {
|
|
|
921
922
|
if (this.allowShaderHotSwapping && previousEffect && !effect.isReady()) {
|
|
922
923
|
effect = previousEffect;
|
|
923
924
|
defines.markAsUnprocessed();
|
|
925
|
+
forceWasNotReadyPreviously = this.isFrozen;
|
|
924
926
|
if (lightDisposed) {
|
|
925
927
|
// re register in case it takes more than one frame.
|
|
926
928
|
defines._areLightsDisposed = true;
|
|
@@ -936,7 +938,7 @@ export class PBRBaseMaterial extends PushMaterial {
|
|
|
936
938
|
return false;
|
|
937
939
|
}
|
|
938
940
|
defines._renderId = scene.getRenderId();
|
|
939
|
-
subMesh.effect._wasPreviouslyReady = true;
|
|
941
|
+
subMesh.effect._wasPreviouslyReady = forceWasNotReadyPreviously ? false : true;
|
|
940
942
|
subMesh.effect._wasPreviouslyUsingInstances = !!useInstances;
|
|
941
943
|
if (scene.performancePriority !== ScenePerformancePriority.BackwardCompatible) {
|
|
942
944
|
this.checkReadyOnlyOnce = true;
|
|
@@ -1170,7 +1172,7 @@ export class PBRBaseMaterial extends PushMaterial {
|
|
|
1170
1172
|
shaderName = this.customShaderNameResolve(shaderName, uniforms, uniformBuffers, samplers, defines, attribs, csnrOptions);
|
|
1171
1173
|
}
|
|
1172
1174
|
const join = defines.toString();
|
|
1173
|
-
|
|
1175
|
+
const effect = engine.createEffect(shaderName, {
|
|
1174
1176
|
attributes: attribs,
|
|
1175
1177
|
uniformsNames: uniforms,
|
|
1176
1178
|
uniformBuffersNames: uniformBuffers,
|
|
@@ -1184,6 +1186,8 @@ export class PBRBaseMaterial extends PushMaterial {
|
|
|
1184
1186
|
processCodeAfterIncludes: this._eventInfo.customCode,
|
|
1185
1187
|
multiTarget: defines.PREPASS,
|
|
1186
1188
|
}, engine);
|
|
1189
|
+
this._eventInfo.customCode = undefined;
|
|
1190
|
+
return effect;
|
|
1187
1191
|
}
|
|
1188
1192
|
_prepareDefines(mesh, defines, useInstances = null, useClipPlane = null, useThinInstances = false) {
|
|
1189
1193
|
var _a;
|
|
@@ -1627,7 +1631,7 @@ export class PBRBaseMaterial extends PushMaterial {
|
|
|
1627
1631
|
world.toNormalMatrix(this._normalMatrix);
|
|
1628
1632
|
this.bindOnlyNormalMatrix(this._normalMatrix);
|
|
1629
1633
|
}
|
|
1630
|
-
const mustRebind = this._mustRebind(scene, effect, mesh.visibility);
|
|
1634
|
+
const mustRebind = effect._forceRebindOnNextCall || this._mustRebind(scene, effect, mesh.visibility);
|
|
1631
1635
|
// Bones
|
|
1632
1636
|
MaterialHelper.BindBonesParameters(mesh, this._activeEffect, this.prePassConfiguration);
|
|
1633
1637
|
let reflectionTexture = null;
|
|
@@ -1635,7 +1639,7 @@ export class PBRBaseMaterial extends PushMaterial {
|
|
|
1635
1639
|
if (mustRebind) {
|
|
1636
1640
|
this.bindViewProjection(effect);
|
|
1637
1641
|
reflectionTexture = this._getReflectionTexture();
|
|
1638
|
-
if (!ubo.useUbo || !this.isFrozen || !ubo.isSync) {
|
|
1642
|
+
if (!ubo.useUbo || !this.isFrozen || !ubo.isSync || effect._forceRebindOnNextCall) {
|
|
1639
1643
|
// Texture uniforms
|
|
1640
1644
|
if (scene.texturesEnabled) {
|
|
1641
1645
|
if (this._albedoTexture && MaterialFlags.DiffuseTextureEnabled) {
|