@babylonjs/core 5.57.0 → 6.0.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/Engines/WebGPU/Extensions/engine.multiRender.js +51 -8
- package/Engines/WebGPU/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/WebGPU/webgpuHardwareTexture.d.ts +4 -3
- package/Engines/WebGPU/webgpuHardwareTexture.js +23 -10
- package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.d.ts +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.js +6 -14
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/engine.d.ts +5 -6
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +16 -8
- package/Engines/webgpuEngine.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.d.ts +2 -0
- package/Lights/Shadows/shadowGenerator.js +11 -22
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Maths/math.vector.js +4 -2
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +13 -0
- package/Meshes/abstractMesh.js +20 -0
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/thinInstanceMesh.js +4 -1
- package/Meshes/thinInstanceMesh.js.map +1 -1
- package/Particles/solidParticleSystem.d.ts +1 -1
- package/Particles/solidParticleSystem.js +1 -1
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Physics/physicsEngineComponent.d.ts +1 -0
- package/Physics/physicsEngineComponent.js +1 -0
- package/Physics/physicsEngineComponent.js.map +1 -1
- package/Physics/physicsHelper.d.ts +12 -5
- package/Physics/physicsHelper.js +160 -90
- package/Physics/physicsHelper.js.map +1 -1
- package/Physics/physicsRaycastResult.d.ts +9 -0
- package/Physics/physicsRaycastResult.js.map +1 -1
- package/Physics/v2/IPhysicsEnginePlugin.d.ts +120 -77
- package/Physics/v2/IPhysicsEnginePlugin.js +119 -48
- package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.d.ts +687 -0
- package/Physics/v2/Plugins/havokPlugin.js +1592 -0
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -0
- package/Physics/v2/Plugins/index.d.ts +1 -0
- package/Physics/v2/Plugins/index.js +1 -1
- package/Physics/v2/Plugins/index.js.map +1 -1
- package/Physics/v2/index.d.ts +1 -0
- package/Physics/v2/index.js +2 -0
- package/Physics/v2/index.js.map +1 -1
- package/Physics/v2/physicsAggregate.d.ts +9 -2
- package/Physics/v2/physicsAggregate.js +66 -31
- package/Physics/v2/physicsAggregate.js.map +1 -1
- package/Physics/v2/physicsBody.d.ts +51 -62
- package/Physics/v2/physicsBody.js +101 -128
- package/Physics/v2/physicsBody.js.map +1 -1
- package/Physics/v2/physicsConstraint.d.ts +57 -25
- package/Physics/v2/physicsConstraint.js +32 -15
- package/Physics/v2/physicsConstraint.js.map +1 -1
- package/Physics/v2/physicsEngine.d.ts +0 -1
- package/Physics/v2/physicsEngine.js +0 -1
- package/Physics/v2/physicsEngine.js.map +1 -1
- package/Physics/v2/physicsEngineComponent.d.ts +0 -10
- package/Physics/v2/physicsEngineComponent.js +0 -29
- package/Physics/v2/physicsEngineComponent.js.map +1 -1
- package/Physics/v2/physicsShape.d.ts +52 -11
- package/Physics/v2/physicsShape.js +80 -23
- package/Physics/v2/physicsShape.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ import "../../Shaders/shadowMap.fragment";
|
|
|
17
17
|
import "../../Shaders/shadowMap.vertex";
|
|
18
18
|
import "../../Shaders/depthBoxBlur.fragment";
|
|
19
19
|
import "../../Shaders/ShadersInclude/shadowMapFragmentSoftTransparentShadow";
|
|
20
|
+
import type { BaseTexture } from "../../Materials/Textures/baseTexture";
|
|
20
21
|
/**
|
|
21
22
|
* Defines the options associated with the creation of a custom shader for a shadow generator.
|
|
22
23
|
*/
|
|
@@ -506,6 +507,7 @@ export declare class ShadowGenerator implements IShadowGenerator {
|
|
|
506
507
|
protected _useUBO: boolean;
|
|
507
508
|
protected _sceneUBOs: UniformBuffer[];
|
|
508
509
|
protected _currentSceneUBO: UniformBuffer;
|
|
510
|
+
protected _opacityTexture: Nullable<BaseTexture>;
|
|
509
511
|
/**
|
|
510
512
|
* @internal
|
|
511
513
|
*/
|
|
@@ -832,19 +832,9 @@ export class ShadowGenerator {
|
|
|
832
832
|
}
|
|
833
833
|
else {
|
|
834
834
|
// Alpha test
|
|
835
|
-
if (this.
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
effect.setTexture("diffuseSampler", opacityTexture);
|
|
839
|
-
effect.setMatrix("diffuseMatrix", opacityTexture.getTextureMatrix() || this._defaultTextureMatrix);
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
else if (material.needAlphaTesting() || material.needAlphaBlending()) {
|
|
843
|
-
const alphaTexture = material.getAlphaTestTexture();
|
|
844
|
-
if (alphaTexture) {
|
|
845
|
-
effect.setTexture("diffuseSampler", alphaTexture);
|
|
846
|
-
effect.setMatrix("diffuseMatrix", alphaTexture.getTextureMatrix() || this._defaultTextureMatrix);
|
|
847
|
-
}
|
|
835
|
+
if (this._opacityTexture) {
|
|
836
|
+
effect.setTexture("diffuseSampler", this._opacityTexture);
|
|
837
|
+
effect.setMatrix("diffuseMatrix", this._opacityTexture.getTextureMatrix() || this._defaultTextureMatrix);
|
|
848
838
|
}
|
|
849
839
|
// Bones
|
|
850
840
|
if (renderingMesh.useBones && renderingMesh.computeBonesUsingShaders && renderingMesh.skeleton) {
|
|
@@ -1015,6 +1005,7 @@ export class ShadowGenerator {
|
|
|
1015
1005
|
isReady(subMesh, useInstances, isTransparent) {
|
|
1016
1006
|
var _a;
|
|
1017
1007
|
const material = subMesh.getMaterial(), shadowDepthWrapper = material === null || material === void 0 ? void 0 : material.shadowDepthWrapper;
|
|
1008
|
+
this._opacityTexture = null;
|
|
1018
1009
|
if (!material) {
|
|
1019
1010
|
return false;
|
|
1020
1011
|
}
|
|
@@ -1040,18 +1031,16 @@ export class ShadowGenerator {
|
|
|
1040
1031
|
}
|
|
1041
1032
|
}
|
|
1042
1033
|
// Alpha test
|
|
1043
|
-
const needAlphaTesting = material
|
|
1044
|
-
|
|
1045
|
-
if (material && (needAlphaTesting || needAlphaBlending)) {
|
|
1046
|
-
let alphaTexture = null;
|
|
1034
|
+
const needAlphaTesting = material.needAlphaTesting();
|
|
1035
|
+
if (needAlphaTesting || material.needAlphaBlending()) {
|
|
1047
1036
|
if (this.useOpacityTextureForTransparentShadow) {
|
|
1048
|
-
|
|
1037
|
+
this._opacityTexture = material.opacityTexture;
|
|
1049
1038
|
}
|
|
1050
1039
|
else {
|
|
1051
|
-
|
|
1040
|
+
this._opacityTexture = material.getAlphaTestTexture();
|
|
1052
1041
|
}
|
|
1053
|
-
if (
|
|
1054
|
-
if (!
|
|
1042
|
+
if (this._opacityTexture) {
|
|
1043
|
+
if (!this._opacityTexture.isReady()) {
|
|
1055
1044
|
return false;
|
|
1056
1045
|
}
|
|
1057
1046
|
const alphaCutOff = (_a = material.alphaCutOff) !== null && _a !== void 0 ? _a : ShadowGenerator.DEFAULT_ALPHA_CUTOFF;
|
|
@@ -1064,7 +1053,7 @@ export class ShadowGenerator {
|
|
|
1064
1053
|
defines.push("#define UV1");
|
|
1065
1054
|
}
|
|
1066
1055
|
if (mesh.isVerticesDataPresent(VertexBuffer.UV2Kind)) {
|
|
1067
|
-
if (
|
|
1056
|
+
if (this._opacityTexture.coordinatesIndex === 1) {
|
|
1068
1057
|
attribs.push(VertexBuffer.UV2Kind);
|
|
1069
1058
|
defines.push("#define UV2");
|
|
1070
1059
|
}
|