@babylonjs/core 6.34.1 → 6.34.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/Cameras/Inputs/followCameraMouseWheelInput.js +12 -9
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/followCameraPointersInput.js +28 -9
- package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
- package/Cameras/followCameraInputsManager.js +2 -1
- package/Cameras/followCameraInputsManager.js.map +1 -1
- package/Debug/skeletonViewer.js +2 -1
- package/Debug/skeletonViewer.js.map +1 -1
- package/Engines/Processors/shaderCodeInliner.js +15 -14
- package/Engines/Processors/shaderCodeInliner.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.computeShader.js +3 -2
- package/Engines/WebGPU/Extensions/engine.computeShader.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessor.js +2 -1
- package/Engines/WebGPU/webgpuShaderProcessor.js.map +1 -1
- package/Engines/WebGPU/webgpuTintWASM.js +3 -2
- package/Engines/WebGPU/webgpuTintWASM.js.map +1 -1
- package/Engines/engine.d.ts +2 -4
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.js +4 -2
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.js +4 -4
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +75 -50
- package/Engines/webgpuEngine.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +2 -1
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
- package/Gizmos/lightGizmo.js +2 -1
- package/Gizmos/lightGizmo.js.map +1 -1
- package/Gizmos/rotationGizmo.js +1 -1
- package/Gizmos/rotationGizmo.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.js +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js +2 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js +3 -2
- package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragDepthBlock.js +2 -1
- package/Materials/Node/Blocks/Fragment/fragDepthBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +2 -1
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/anisotropyBlock.js +2 -1
- package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +3 -2
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.js +2 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.js +9 -8
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBlock.js +2 -1
- package/Materials/Node/nodeMaterialBlock.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.js +1 -2
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Materials/uniformBuffer.d.ts +1 -4
- package/Materials/uniformBuffer.js +2 -5
- package/Materials/uniformBuffer.js.map +1 -1
- package/Meshes/Builders/groundBuilder.d.ts +7 -1
- package/Meshes/Builders/groundBuilder.js +17 -8
- package/Meshes/Builders/groundBuilder.js.map +1 -1
- package/Meshes/Compression/dracoCompression.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlock.js +2 -1
- package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
- package/Meshes/mesh.d.ts +2 -1
- package/Meshes/mesh.js +3 -2
- package/Meshes/mesh.js.map +1 -1
- package/Misc/assetsManager.js +2 -2
- package/Misc/assetsManager.js.map +1 -1
- package/Misc/dds.js +1 -1
- package/Misc/dds.js.map +1 -1
- package/Misc/fileTools.js +4 -0
- package/Misc/fileTools.js.map +1 -1
- package/Misc/logger.d.ts +3 -3
- package/Misc/logger.js +8 -4
- package/Misc/logger.js.map +1 -1
- package/Misc/sceneSerializer.js +2 -1
- package/Misc/sceneSerializer.js.map +1 -1
- package/Misc/tools.d.ts +2 -7
- package/Misc/tools.js.map +1 -1
- package/Navigation/Plugins/recastJSPlugin.js +3 -3
- package/Navigation/Plugins/recastJSPlugin.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.js +1 -1
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/Physics/v2/physicsBody.d.ts +5 -0
- package/Physics/v2/physicsBody.js +7 -0
- package/Physics/v2/physicsBody.js.map +1 -1
- package/Physics/v2/ragdoll.d.ts +5 -10
- package/Physics/v2/ragdoll.js +29 -36
- package/Physics/v2/ragdoll.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +2 -2
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +3 -2
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.js +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.js +3 -2
- package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
- package/Rendering/GaussianSplatting/gaussianSplatting.js.map +1 -1
- package/XR/features/WebXRControllerPhysics.js +2 -2
- package/XR/features/WebXRControllerPhysics.js.map +1 -1
- package/XR/features/WebXRMeshDetector.js +2 -1
- package/XR/features/WebXRMeshDetector.js.map +1 -1
- package/XR/features/WebXRWalkingLocomotion.js +1 -1
- package/XR/features/WebXRWalkingLocomotion.js.map +1 -1
- package/XR/motionController/webXRMotionControllerManager.js +1 -1
- package/XR/motionController/webXRMotionControllerManager.js.map +1 -1
- package/XR/webXRExperienceHelper.js +2 -2
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/assetContainer.js +2 -2
- package/assetContainer.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +2 -4
- package/scene.js +2 -1
- package/scene.js.map +1 -1
package/Engines/webgpuEngine.js
CHANGED
|
@@ -433,7 +433,7 @@ export class WebGPUEngine extends Engine {
|
|
|
433
433
|
if (this.dbgVerboseLogsForFirstFrames) {
|
|
434
434
|
if (this._count === undefined) {
|
|
435
435
|
this._count = 0;
|
|
436
|
-
|
|
436
|
+
Logger.Log(["%c frame #" + this._count + " - begin", "background: #ffff00"]);
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
this._uploadEncoder = this._device.createCommandEncoder(this._uploadEncoderDescriptor);
|
|
@@ -458,11 +458,11 @@ export class WebGPUEngine extends Engine {
|
|
|
458
458
|
this.resize();
|
|
459
459
|
})
|
|
460
460
|
.catch((e) => {
|
|
461
|
+
var _a;
|
|
461
462
|
Logger.Error("Can not create WebGPU Device and/or context.");
|
|
462
463
|
Logger.Error(e);
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
}
|
|
464
|
+
// eslint-disable-next-line no-console
|
|
465
|
+
(_a = console === null || console === void 0 ? void 0 : console.trace) === null || _a === void 0 ? void 0 : _a.call(console);
|
|
466
466
|
});
|
|
467
467
|
}
|
|
468
468
|
_initGlslang(glslangOptions) {
|
|
@@ -692,7 +692,7 @@ export class WebGPUEngine extends Engine {
|
|
|
692
692
|
this._count = 0;
|
|
693
693
|
}
|
|
694
694
|
if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
|
|
695
|
-
|
|
695
|
+
Logger.Log(["frame #" + this._count + " - setSize -", width, height]);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
698
|
this._initializeMainAttachments();
|
|
@@ -817,7 +817,14 @@ export class WebGPUEngine extends Engine {
|
|
|
817
817
|
this._count = 0;
|
|
818
818
|
}
|
|
819
819
|
if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
|
|
820
|
-
|
|
820
|
+
Logger.Log([
|
|
821
|
+
"frame #" + this._count + " - viewport applied - (",
|
|
822
|
+
this._viewportCached.x,
|
|
823
|
+
this._viewportCached.y,
|
|
824
|
+
this._viewportCached.z,
|
|
825
|
+
this._viewportCached.w,
|
|
826
|
+
") current pass is main pass=" + this._currentPassIsMainPass(),
|
|
827
|
+
]);
|
|
821
828
|
}
|
|
822
829
|
}
|
|
823
830
|
}
|
|
@@ -854,7 +861,14 @@ export class WebGPUEngine extends Engine {
|
|
|
854
861
|
this._count = 0;
|
|
855
862
|
}
|
|
856
863
|
if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
|
|
857
|
-
|
|
864
|
+
Logger.Log([
|
|
865
|
+
"frame #" + this._count + " - scissor applied - (",
|
|
866
|
+
this._scissorCached.x,
|
|
867
|
+
this._scissorCached.y,
|
|
868
|
+
this._scissorCached.z,
|
|
869
|
+
this._scissorCached.w,
|
|
870
|
+
") current pass is main pass=" + this._currentPassIsMainPass(),
|
|
871
|
+
]);
|
|
858
872
|
}
|
|
859
873
|
}
|
|
860
874
|
}
|
|
@@ -933,7 +947,7 @@ export class WebGPUEngine extends Engine {
|
|
|
933
947
|
this._count = 0;
|
|
934
948
|
}
|
|
935
949
|
if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
|
|
936
|
-
|
|
950
|
+
Logger.Log(["frame #" + this._count + " - clear - backBuffer=", backBuffer, " depth=", depth, " stencil=", stencil, " scissor is active=", hasScissor]);
|
|
937
951
|
}
|
|
938
952
|
}
|
|
939
953
|
// We need to recreate the render pass so that the new parameters for clear color / depth / stencil are taken into account
|
|
@@ -1257,10 +1271,10 @@ export class WebGPUEngine extends Engine {
|
|
|
1257
1271
|
const webGpuContext = pipelineContext;
|
|
1258
1272
|
const shaderLanguage = webGpuContext.shaderProcessingContext.shaderLanguage;
|
|
1259
1273
|
if (this.dbgShowShaderCode) {
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1274
|
+
Logger.Log(["defines", defines]);
|
|
1275
|
+
Logger.Log(vertexSourceCode);
|
|
1276
|
+
Logger.Log(fragmentSourceCode);
|
|
1277
|
+
Logger.Log("***********************************************");
|
|
1264
1278
|
}
|
|
1265
1279
|
webGpuContext.sources = {
|
|
1266
1280
|
fragment: fragmentSourceCode,
|
|
@@ -1319,7 +1333,7 @@ export class WebGPUEngine extends Engine {
|
|
|
1319
1333
|
effect.drawContext === this._currentDrawContext &&
|
|
1320
1334
|
!this._forceEnableEffect)) {
|
|
1321
1335
|
if (!effect.effect && this.dbgShowEmptyEnableEffectCalls) {
|
|
1322
|
-
|
|
1336
|
+
Logger.Log(["drawWrapper=", effect]);
|
|
1323
1337
|
throw "Invalid call to enableEffect: the effect property is empty!";
|
|
1324
1338
|
}
|
|
1325
1339
|
return;
|
|
@@ -1331,7 +1345,7 @@ export class WebGPUEngine extends Engine {
|
|
|
1331
1345
|
this._currentDrawContext = effect.drawContext;
|
|
1332
1346
|
this._counters.numEnableDrawWrapper++;
|
|
1333
1347
|
if (!this._currentMaterialContext) {
|
|
1334
|
-
|
|
1348
|
+
Logger.Log(["drawWrapper=", effect]);
|
|
1335
1349
|
throw `Invalid call to enableEffect: the materialContext property is empty!`;
|
|
1336
1350
|
}
|
|
1337
1351
|
}
|
|
@@ -1708,7 +1722,7 @@ export class WebGPUEngine extends Engine {
|
|
|
1708
1722
|
this._count = 0;
|
|
1709
1723
|
}
|
|
1710
1724
|
if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
|
|
1711
|
-
|
|
1725
|
+
Logger.Log(["frame #" + this._count + " - _setTexture called with a null _currentEffect! texture=", texture]);
|
|
1712
1726
|
}
|
|
1713
1727
|
}
|
|
1714
1728
|
}
|
|
@@ -1758,7 +1772,7 @@ export class WebGPUEngine extends Engine {
|
|
|
1758
1772
|
this._count = 0;
|
|
1759
1773
|
}
|
|
1760
1774
|
if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
|
|
1761
|
-
|
|
1775
|
+
Logger.Log("frame #" +
|
|
1762
1776
|
this._count +
|
|
1763
1777
|
" - generate mipmaps - width=" +
|
|
1764
1778
|
texture.width +
|
|
@@ -1911,7 +1925,7 @@ export class WebGPUEngine extends Engine {
|
|
|
1911
1925
|
for (const name in UniformBuffer._UpdatedUbosInFrame) {
|
|
1912
1926
|
list.push(name + ":" + UniformBuffer._UpdatedUbosInFrame[name]);
|
|
1913
1927
|
}
|
|
1914
|
-
|
|
1928
|
+
Logger.Log(["frame #" + this._count + " - updated ubos -", list.join(", ")]);
|
|
1915
1929
|
}
|
|
1916
1930
|
}
|
|
1917
1931
|
UniformBuffer._UpdatedUbosInFrame = {};
|
|
@@ -1933,12 +1947,12 @@ export class WebGPUEngine extends Engine {
|
|
|
1933
1947
|
this._count = 0;
|
|
1934
1948
|
}
|
|
1935
1949
|
if (this._count < this.dbgVerboseLogsNumFrames) {
|
|
1936
|
-
|
|
1950
|
+
Logger.Log(["%c frame #" + this._count + " - end", "background: #ffff00"]);
|
|
1937
1951
|
}
|
|
1938
1952
|
if (this._count < this.dbgVerboseLogsNumFrames) {
|
|
1939
1953
|
this._count++;
|
|
1940
1954
|
if (this._count !== this.dbgVerboseLogsNumFrames) {
|
|
1941
|
-
|
|
1955
|
+
Logger.Log(["%c frame #" + this._count + " - begin", "background: #ffff00"]);
|
|
1942
1956
|
}
|
|
1943
1957
|
}
|
|
1944
1958
|
}
|
|
@@ -1952,10 +1966,6 @@ export class WebGPUEngine extends Engine {
|
|
|
1952
1966
|
this._commandBuffers[0] = this._uploadEncoder.finish();
|
|
1953
1967
|
this._commandBuffers[1] = this._renderEncoder.finish();
|
|
1954
1968
|
this._device.queue.submit(this._commandBuffers);
|
|
1955
|
-
// Now that the command buffers have been submitted, we can reset the ubo as we can reuse the same GPU buffer(s)
|
|
1956
|
-
for (let i = 0; i < this._uniformBuffers.length; ++i) {
|
|
1957
|
-
this._uniformBuffers[i]._checkNewFrame(true);
|
|
1958
|
-
}
|
|
1959
1969
|
this._uploadEncoder = this._device.createCommandEncoder(this._uploadEncoderDescriptor);
|
|
1960
1970
|
this._renderEncoder = this._device.createCommandEncoder(this._renderEncoderDescriptor);
|
|
1961
1971
|
this._timestampQuery.startFrame(this._uploadEncoder);
|
|
@@ -2075,18 +2085,22 @@ export class WebGPUEngine extends Engine {
|
|
|
2075
2085
|
}
|
|
2076
2086
|
if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
|
|
2077
2087
|
const internalTexture = rtWrapper.texture;
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2088
|
+
Logger.Log([
|
|
2089
|
+
"frame #" +
|
|
2090
|
+
this._count +
|
|
2091
|
+
" - render target begin pass - rtt name=" +
|
|
2092
|
+
renderTargetWrapper.label +
|
|
2093
|
+
", internalTexture.uniqueId=" +
|
|
2094
|
+
internalTexture.uniqueId +
|
|
2095
|
+
", width=" +
|
|
2096
|
+
internalTexture.width +
|
|
2097
|
+
", height=" +
|
|
2098
|
+
internalTexture.height +
|
|
2099
|
+
", setClearStates=" +
|
|
2100
|
+
setClearStates,
|
|
2101
|
+
"renderPassDescriptor=",
|
|
2102
|
+
this._rttRenderPassWrapper.renderPassDescriptor,
|
|
2103
|
+
]);
|
|
2090
2104
|
}
|
|
2091
2105
|
}
|
|
2092
2106
|
(_h = this._debugFlushPendingCommands) === null || _h === void 0 ? void 0 : _h.call(this);
|
|
@@ -2135,7 +2149,12 @@ export class WebGPUEngine extends Engine {
|
|
|
2135
2149
|
this._count = 0;
|
|
2136
2150
|
}
|
|
2137
2151
|
if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
|
|
2138
|
-
|
|
2152
|
+
Logger.Log([
|
|
2153
|
+
"frame #" + this._count + " - main begin pass - texture width=" + this._mainTextureExtends.width,
|
|
2154
|
+
" height=" + this._mainTextureExtends.height + ", setClearStates=" + setClearStates,
|
|
2155
|
+
"renderPassDescriptor=",
|
|
2156
|
+
this._mainRenderPassWrapper.renderPassDescriptor,
|
|
2157
|
+
]);
|
|
2139
2158
|
}
|
|
2140
2159
|
}
|
|
2141
2160
|
(_b = this._debugPushGroup) === null || _b === void 0 ? void 0 : _b.call(this, "main pass", 0);
|
|
@@ -2165,7 +2184,7 @@ export class WebGPUEngine extends Engine {
|
|
|
2165
2184
|
this._count = 0;
|
|
2166
2185
|
}
|
|
2167
2186
|
if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
|
|
2168
|
-
|
|
2187
|
+
Logger.Log("frame #" +
|
|
2169
2188
|
this._count +
|
|
2170
2189
|
" - " +
|
|
2171
2190
|
(currentPassIndex === 2 ? "main" : "render target") +
|
|
@@ -2226,18 +2245,24 @@ export class WebGPUEngine extends Engine {
|
|
|
2226
2245
|
this._count = 0;
|
|
2227
2246
|
}
|
|
2228
2247
|
if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2248
|
+
Logger.Log([
|
|
2249
|
+
"frame #" +
|
|
2250
|
+
this._count +
|
|
2251
|
+
" - bindFramebuffer - rtt name=" +
|
|
2252
|
+
texture.label +
|
|
2253
|
+
", internalTexture.uniqueId=" +
|
|
2254
|
+
((_b = texture.texture) === null || _b === void 0 ? void 0 : _b.uniqueId) +
|
|
2255
|
+
", face=" +
|
|
2256
|
+
faceIndex +
|
|
2257
|
+
", lodLevel=" +
|
|
2258
|
+
lodLevel +
|
|
2259
|
+
", layer=" +
|
|
2260
|
+
layer,
|
|
2261
|
+
"colorAttachmentViewDescriptor=",
|
|
2262
|
+
this._rttRenderPassWrapper.colorAttachmentViewDescriptor,
|
|
2263
|
+
"depthAttachmentViewDescriptor=",
|
|
2264
|
+
this._rttRenderPassWrapper.depthAttachmentViewDescriptor,
|
|
2265
|
+
]);
|
|
2241
2266
|
}
|
|
2242
2267
|
}
|
|
2243
2268
|
// We don't create the render pass just now, we do a lazy creation of the render pass, hoping the render pass will be created by a call to clear()...
|
|
@@ -2285,7 +2310,7 @@ export class WebGPUEngine extends Engine {
|
|
|
2285
2310
|
this._count = 0;
|
|
2286
2311
|
}
|
|
2287
2312
|
if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
|
|
2288
|
-
|
|
2313
|
+
Logger.Log("frame #" + this._count + " - unBindFramebuffer - rtt name=" + texture.label + ", internalTexture.uniqueId=", (_b = texture.texture) === null || _b === void 0 ? void 0 : _b.uniqueId);
|
|
2289
2314
|
}
|
|
2290
2315
|
}
|
|
2291
2316
|
this._mrtAttachments = [];
|