@babylonjs/core 5.25.0 → 5.26.1
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/Audio/audioEngine.js +1 -2
- package/Audio/audioEngine.js.map +1 -1
- package/Cameras/Inputs/freeCameraDeviceOrientationInput.d.ts +4 -1
- package/Cameras/Inputs/freeCameraDeviceOrientationInput.js +17 -4
- package/Cameras/Inputs/freeCameraDeviceOrientationInput.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.js +1 -24
- package/Cameras/VR/vrExperienceHelper.js.map +1 -1
- package/Culling/Octrees/octreeSceneComponent.js +1 -5
- package/Culling/Octrees/octreeSceneComponent.js.map +1 -1
- package/DeviceInput/webDeviceInputSystem.js +0 -18
- package/DeviceInput/webDeviceInputSystem.js.map +1 -1
- package/Engines/Extensions/engine.cubeTexture.js +3 -2
- package/Engines/Extensions/engine.cubeTexture.js.map +1 -1
- package/Engines/engine.js +3 -34
- package/Engines/engine.js.map +1 -1
- package/Engines/thinEngine.js +2 -14
- package/Engines/thinEngine.js.map +1 -1
- package/Gamepads/gamepadManager.js +2 -2
- package/Gamepads/gamepadManager.js.map +1 -1
- package/Layers/layer.d.ts +7 -0
- package/Layers/layer.js +11 -0
- package/Layers/layer.js.map +1 -1
- package/Layers/layerSceneComponent.d.ts +4 -2
- package/Layers/layerSceneComponent.js +27 -11
- package/Layers/layerSceneComponent.js.map +1 -1
- package/Loading/loadingScreen.js +6 -6
- package/Loading/loadingScreen.js.map +1 -1
- package/Materials/Node/nodeMaterialBlockConnectionPoint.d.ts +1 -2
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.js +3 -0
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Materials/Textures/thinRenderTargetTexture.js +1 -1
- package/Materials/Textures/thinRenderTargetTexture.js.map +1 -1
- package/Materials/Textures/videoTexture.js +2 -2
- package/Materials/Textures/videoTexture.js.map +1 -1
- package/Materials/material.js +5 -2
- package/Materials/material.js.map +1 -1
- package/Materials/materialHelper.js +1 -6
- package/Materials/materialHelper.js.map +1 -1
- package/Maths/math.vector.d.ts +47 -10
- package/Maths/math.vector.js +89 -10
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/instancedMesh.js +1 -1
- package/Meshes/instancedMesh.js.map +1 -1
- package/Meshes/mesh.d.ts +1 -1
- package/Meshes/mesh.js +4 -6
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/subMesh.d.ts +2 -0
- package/Meshes/subMesh.js +2 -0
- package/Meshes/subMesh.js.map +1 -1
- package/Misc/tools.d.ts +9 -0
- package/Misc/tools.js +14 -5
- package/Misc/tools.js.map +1 -1
- package/Misc/virtualJoystick.js +0 -1
- package/Misc/virtualJoystick.js.map +1 -1
- package/Particles/IParticleSystem.d.ts +6 -0
- package/Particles/IParticleSystem.js.map +1 -1
- package/Particles/baseParticleSystem.d.ts +8 -0
- package/Particles/baseParticleSystem.js +12 -0
- package/Particles/baseParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +1 -1
- package/Particles/gpuParticleSystem.js +12 -2
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particleSystem.d.ts +1 -1
- package/Particles/particleSystem.js +17 -2
- package/Particles/particleSystem.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/Rendering/renderingManager.d.ts +11 -0
- package/Rendering/renderingManager.js +55 -9
- package/Rendering/renderingManager.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockAlbedoOpacity.js +2 -2
- package/Shaders/ShadersInclude/pbrBlockAlbedoOpacity.js.map +1 -1
- package/Shaders/ShadersInclude/pbrFragmentExtraDeclaration.js +1 -1
- package/Shaders/ShadersInclude/pbrFragmentExtraDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/vertexColorMixing.js +1 -1
- package/Shaders/ShadersInclude/vertexColorMixing.js.map +1 -1
- package/Shaders/color.fragment.js +3 -2
- package/Shaders/color.fragment.js.map +1 -1
- package/Shaders/color.vertex.js +1 -1
- package/Shaders/color.vertex.js.map +1 -1
- package/Shaders/default.fragment.js +3 -3
- package/Shaders/default.fragment.js.map +1 -1
- package/Shaders/default.vertex.js +1 -1
- package/Shaders/default.vertex.js.map +1 -1
- package/Shaders/gpuRenderParticles.fragment.d.ts +2 -0
- package/Shaders/gpuRenderParticles.fragment.js +8 -1
- package/Shaders/gpuRenderParticles.fragment.js.map +1 -1
- package/Shaders/gpuRenderParticles.vertex.d.ts +2 -0
- package/Shaders/gpuRenderParticles.vertex.js +4 -0
- package/Shaders/gpuRenderParticles.vertex.js.map +1 -1
- package/Shaders/particles.fragment.d.ts +2 -0
- package/Shaders/particles.fragment.js +8 -1
- package/Shaders/particles.fragment.js.map +1 -1
- package/Shaders/particles.vertex.d.ts +2 -0
- package/Shaders/particles.vertex.js +4 -0
- package/Shaders/particles.vertex.js.map +1 -1
- package/Shaders/pbr.vertex.js +1 -1
- package/Shaders/pbr.vertex.js.map +1 -1
- package/Sprites/spriteManager.d.ts +4 -0
- package/Sprites/spriteManager.js +2 -0
- package/Sprites/spriteManager.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +14 -0
- package/scene.js +37 -12
- package/scene.js.map +1 -1
- package/sceneComponent.d.ts +2 -0
- package/sceneComponent.js +2 -0
- package/sceneComponent.js.map +1 -1
|
@@ -19,6 +19,7 @@ import "../Shaders/particles.vertex.js";
|
|
|
19
19
|
import { Color4, Color3, TmpColors } from "../Maths/math.color.js";
|
|
20
20
|
import { ThinEngine } from "../Engines/thinEngine.js";
|
|
21
21
|
import { ThinMaterialHelper } from "../Materials/thinMaterialHelper.js";
|
|
22
|
+
import { MaterialHelper } from "../Materials/materialHelper.js";
|
|
22
23
|
import "../Engines/Extensions/engine.alpha.js";
|
|
23
24
|
/**
|
|
24
25
|
* This represents a particle system in Babylon.
|
|
@@ -1360,7 +1361,7 @@ export class ParticleSystem extends BaseParticleSystem {
|
|
|
1360
1361
|
/**
|
|
1361
1362
|
* @internal
|
|
1362
1363
|
*/
|
|
1363
|
-
static _GetEffectCreationOptions(isAnimationSheetEnabled = false) {
|
|
1364
|
+
static _GetEffectCreationOptions(isAnimationSheetEnabled = false, useLogarithmicDepth = false) {
|
|
1364
1365
|
const effectCreationOption = [
|
|
1365
1366
|
"invView",
|
|
1366
1367
|
"view",
|
|
@@ -1378,6 +1379,9 @@ export class ParticleSystem extends BaseParticleSystem {
|
|
|
1378
1379
|
if (isAnimationSheetEnabled) {
|
|
1379
1380
|
effectCreationOption.push("particlesInfos");
|
|
1380
1381
|
}
|
|
1382
|
+
if (useLogarithmicDepth) {
|
|
1383
|
+
effectCreationOption.push("logarithmicDepthConstant");
|
|
1384
|
+
}
|
|
1381
1385
|
return effectCreationOption;
|
|
1382
1386
|
}
|
|
1383
1387
|
/**
|
|
@@ -1409,6 +1413,9 @@ export class ParticleSystem extends BaseParticleSystem {
|
|
|
1409
1413
|
if (this._isAnimationSheetEnabled) {
|
|
1410
1414
|
defines.push("#define ANIMATESHEET");
|
|
1411
1415
|
}
|
|
1416
|
+
if (this.useLogarithmicDepth) {
|
|
1417
|
+
defines.push("#define LOGARITHMICDEPTH");
|
|
1418
|
+
}
|
|
1412
1419
|
if (blendMode === ParticleSystem.BLENDMODE_MULTIPLY) {
|
|
1413
1420
|
defines.push("#define BLENDMULTIPLYMODE");
|
|
1414
1421
|
}
|
|
@@ -1444,7 +1451,7 @@ export class ParticleSystem extends BaseParticleSystem {
|
|
|
1444
1451
|
*/
|
|
1445
1452
|
fillUniformsAttributesAndSamplerNames(uniforms, attributes, samplers) {
|
|
1446
1453
|
attributes.push(...ParticleSystem._GetAttributeNamesOrOptions(this._isAnimationSheetEnabled, this._isBillboardBased && this.billboardMode !== ParticleSystem.BILLBOARDMODE_STRETCHED, this._useRampGradients));
|
|
1447
|
-
uniforms.push(...ParticleSystem._GetEffectCreationOptions(this._isAnimationSheetEnabled));
|
|
1454
|
+
uniforms.push(...ParticleSystem._GetEffectCreationOptions(this._isAnimationSheetEnabled, this.useLogarithmicDepth));
|
|
1448
1455
|
samplers.push("diffuseSampler", "rampSampler");
|
|
1449
1456
|
if (this._imageProcessingConfiguration) {
|
|
1450
1457
|
ImageProcessingConfiguration.PrepareUniforms(uniforms, this._imageProcessingConfigurationDefines);
|
|
@@ -1662,6 +1669,10 @@ export class ParticleSystem extends BaseParticleSystem {
|
|
|
1662
1669
|
else {
|
|
1663
1670
|
engine.bindBuffers(this._vertexBuffers, this._indexBuffer, effect);
|
|
1664
1671
|
}
|
|
1672
|
+
// Log. depth
|
|
1673
|
+
if (this.useLogarithmicDepth && this._scene) {
|
|
1674
|
+
MaterialHelper.BindLogDepth(defines, effect, this._scene);
|
|
1675
|
+
}
|
|
1665
1676
|
// image processing
|
|
1666
1677
|
if (this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess) {
|
|
1667
1678
|
this._imageProcessingConfiguration.bind(effect);
|
|
@@ -1930,6 +1941,7 @@ export class ParticleSystem extends BaseParticleSystem {
|
|
|
1930
1941
|
serializationObject.spriteCellHeight = particleSystem.spriteCellHeight;
|
|
1931
1942
|
serializationObject.spriteRandomStartCell = particleSystem.spriteRandomStartCell;
|
|
1932
1943
|
serializationObject.isAnimationSheetEnabled = particleSystem.isAnimationSheetEnabled;
|
|
1944
|
+
serializationObject.useLogarithmicDepth = particleSystem.useLogarithmicDepth;
|
|
1933
1945
|
const colorGradients = particleSystem.getColorGradients();
|
|
1934
1946
|
if (colorGradients) {
|
|
1935
1947
|
serializationObject.colorGradients = [];
|
|
@@ -2177,6 +2189,9 @@ export class ParticleSystem extends BaseParticleSystem {
|
|
|
2177
2189
|
if (parsedParticleSystem.billboardMode !== undefined) {
|
|
2178
2190
|
particleSystem.billboardMode = parsedParticleSystem.billboardMode;
|
|
2179
2191
|
}
|
|
2192
|
+
if (parsedParticleSystem.useLogarithmicDepth !== undefined) {
|
|
2193
|
+
particleSystem.useLogarithmicDepth = parsedParticleSystem.useLogarithmicDepth;
|
|
2194
|
+
}
|
|
2180
2195
|
// Animations
|
|
2181
2196
|
if (parsedParticleSystem.animations) {
|
|
2182
2197
|
for (let animationIndex = 0; animationIndex < parsedParticleSystem.animations.length; animationIndex++) {
|