@babylonjs/core 5.31.0 → 5.31.2
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/Animations/animatable.d.ts +1 -0
- package/Animations/animatable.js +7 -0
- package/Animations/animatable.js.map +1 -1
- package/Engines/Extensions/engine.rawTexture.js +17 -0
- package/Engines/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/Extensions/engine.views.js +2 -2
- package/Engines/Extensions/engine.views.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.rawTexture.js +3 -0
- package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/thinEngine.js +6 -4
- package/Engines/thinEngine.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +8 -4
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Materials/effectRenderer.d.ts +6 -4
- package/Materials/effectRenderer.js +27 -28
- package/Materials/effectRenderer.js.map +1 -1
- package/Meshes/mesh.d.ts +3 -1
- package/Meshes/mesh.js +4 -1
- package/Meshes/mesh.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.js +7 -5
- package/PostProcesses/motionBlurPostProcess.js.map +1 -1
- package/Shaders/motionBlur.fragment.js +2 -2
- package/Shaders/motionBlur.fragment.js.map +1 -1
- package/Shaders/shadowMap.fragment.js +6 -4
- package/Shaders/shadowMap.fragment.js.map +1 -1
- package/Shaders/shadowMap.vertex.js +2 -2
- package/Shaders/shadowMap.vertex.js.map +1 -1
- package/XR/webXRCamera.js +2 -0
- package/XR/webXRCamera.js.map +1 -1
- package/assetContainer.js +2 -2
- package/assetContainer.js.map +1 -1
- package/package.json +1 -1
|
@@ -838,7 +838,7 @@ export class ShadowGenerator {
|
|
|
838
838
|
effect.setMatrix("diffuseMatrix", opacityTexture.getTextureMatrix() || this._defaultTextureMatrix);
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
|
-
else if (material && material.needAlphaTesting()) {
|
|
841
|
+
else if (material && (material.needAlphaTesting() || material.needAlphaBlending())) {
|
|
842
842
|
const alphaTexture = material.getAlphaTestTexture();
|
|
843
843
|
if (alphaTexture) {
|
|
844
844
|
effect.setTexture("diffuseSampler", alphaTexture);
|
|
@@ -1035,7 +1035,9 @@ export class ShadowGenerator {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
1037
|
// Alpha test
|
|
1038
|
-
|
|
1038
|
+
const needAlphaTesting = material === null || material === void 0 ? void 0 : material.needAlphaTesting();
|
|
1039
|
+
const needAlphaBlending = material === null || material === void 0 ? void 0 : material.needAlphaBlending();
|
|
1040
|
+
if (material && (needAlphaTesting || needAlphaBlending)) {
|
|
1039
1041
|
let alphaTexture = null;
|
|
1040
1042
|
if (this.useOpacityTextureForTransparentShadow) {
|
|
1041
1043
|
alphaTexture = material.opacityTexture;
|
|
@@ -1048,8 +1050,10 @@ export class ShadowGenerator {
|
|
|
1048
1050
|
return false;
|
|
1049
1051
|
}
|
|
1050
1052
|
const alphaCutOff = (_a = material.alphaCutOff) !== null && _a !== void 0 ? _a : ShadowGenerator.DEFAULT_ALPHA_CUTOFF;
|
|
1051
|
-
defines.push("#define
|
|
1052
|
-
|
|
1053
|
+
defines.push("#define ALPHATEXTURE");
|
|
1054
|
+
if (needAlphaTesting) {
|
|
1055
|
+
defines.push(`#define ALPHATESTVALUE ${alphaCutOff}${alphaCutOff % 1 === 0 ? "." : ""}`);
|
|
1056
|
+
}
|
|
1053
1057
|
if (mesh.isVerticesDataPresent(VertexBuffer.UVKind)) {
|
|
1054
1058
|
attribs.push(VertexBuffer.UVKind);
|
|
1055
1059
|
defines.push("#define UV1");
|