@babylonjs/core 5.3.0 → 5.4.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/Behaviors/Cameras/autoRotationBehavior.d.ts +7 -0
- package/Behaviors/Cameras/autoRotationBehavior.js +15 -0
- package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
- package/Cameras/camera.d.ts +2 -1
- package/Cameras/camera.js +4 -1
- package/Cameras/camera.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTarget.js +2 -2
- package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.d.ts +1 -0
- package/Engines/WebGPU/webgpuTextureHelper.js +16 -3
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/constants.d.ts +4 -0
- package/Engines/constants.js +4 -0
- package/Engines/constants.js.map +1 -1
- package/Engines/engine.d.ts +2 -2
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +14 -5
- package/Engines/webgpuEngine.js.map +1 -1
- package/Layers/effectLayer.js +1 -1
- package/Layers/effectLayer.js.map +1 -1
- package/Materials/Background/backgroundMaterial.js +1 -1
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/Textures/cubeTexture.js +3 -0
- package/Materials/Textures/cubeTexture.js.map +1 -1
- package/Materials/materialHelper.js +1 -1
- package/Materials/materialHelper.js.map +1 -1
- package/Materials/shaderMaterial.js +1 -0
- package/Materials/shaderMaterial.js.map +1 -1
- package/Maths/math.vector.d.ts +4 -0
- package/Maths/math.vector.js +10 -0
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/subMesh.js +1 -1
- package/Meshes/subMesh.js.map +1 -1
- package/Meshes/thinInstanceMesh.js +2 -1
- package/Meshes/thinInstanceMesh.js.map +1 -1
- package/Physics/Plugins/oimoJSPlugin.js +1 -1
- package/Physics/Plugins/oimoJSPlugin.js.map +1 -1
- package/Rendering/renderingGroup.js +8 -0
- package/Rendering/renderingGroup.js.map +1 -1
- package/Shaders/pbr.vertex.js +1 -1
- package/Shaders/pbr.vertex.js.map +1 -1
- package/XR/features/WebXRControllerPointerSelection.js +1 -0
- package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +3 -1
- package/scene.js +7 -3
- package/scene.js.map +1 -1
package/Engines/webgpuEngine.js
CHANGED
|
@@ -675,8 +675,8 @@ var WebGPUEngine = /** @class */ (function (_super) {
|
|
|
675
675
|
depthLoadOp: WebGPUConstants.LoadOp.Clear,
|
|
676
676
|
depthStoreOp: WebGPUConstants.StoreOp.Store,
|
|
677
677
|
stencilClearValue: this._clearStencilValue,
|
|
678
|
-
stencilLoadOp: WebGPUConstants.LoadOp.Clear,
|
|
679
|
-
stencilStoreOp: WebGPUConstants.StoreOp.Store,
|
|
678
|
+
stencilLoadOp: !this.isStencilEnable ? undefined : WebGPUConstants.LoadOp.Clear,
|
|
679
|
+
stencilStoreOp: !this.isStencilEnable ? undefined : WebGPUConstants.StoreOp.Store,
|
|
680
680
|
};
|
|
681
681
|
this._mainRenderPassWrapper.renderPassDescriptor = {
|
|
682
682
|
colorAttachments: mainColorAttachments,
|
|
@@ -2089,6 +2089,7 @@ var WebGPUEngine = /** @class */ (function (_super) {
|
|
|
2089
2089
|
var gpuDepthStencilMSAATexture = gpuDepthStencilWrapper === null || gpuDepthStencilWrapper === void 0 ? void 0 : gpuDepthStencilWrapper.msaaTexture;
|
|
2090
2090
|
var depthTextureView = gpuDepthStencilTexture === null || gpuDepthStencilTexture === void 0 ? void 0 : gpuDepthStencilTexture.createView(this._rttRenderPassWrapper.depthAttachmentViewDescriptor);
|
|
2091
2091
|
var depthMSAATextureView = gpuDepthStencilMSAATexture === null || gpuDepthStencilMSAATexture === void 0 ? void 0 : gpuDepthStencilMSAATexture.createView(this._rttRenderPassWrapper.depthAttachmentViewDescriptor);
|
|
2092
|
+
var depthTextureHasStencil = gpuDepthStencilWrapper ? WebGPUTextureHelper.HasStencilAspect(gpuDepthStencilWrapper.format) : false;
|
|
2092
2093
|
var colorAttachments = [];
|
|
2093
2094
|
if (this.useReverseDepthBuffer) {
|
|
2094
2095
|
this.setDepthFunctionToGreaterOrEqual();
|
|
@@ -2149,8 +2150,12 @@ var WebGPUEngine = /** @class */ (function (_super) {
|
|
|
2149
2150
|
depthLoadOp: mustClearDepth ? WebGPUConstants.LoadOp.Clear : WebGPUConstants.LoadOp.Load,
|
|
2150
2151
|
depthStoreOp: WebGPUConstants.StoreOp.Store,
|
|
2151
2152
|
stencilClearValue: rtWrapper._depthStencilTextureWithStencil && mustClearStencil ? this._clearStencilValue : undefined,
|
|
2152
|
-
stencilLoadOp:
|
|
2153
|
-
|
|
2153
|
+
stencilLoadOp: !depthTextureHasStencil
|
|
2154
|
+
? undefined
|
|
2155
|
+
: rtWrapper._depthStencilTextureWithStencil && mustClearStencil
|
|
2156
|
+
? WebGPUConstants.LoadOp.Clear
|
|
2157
|
+
: WebGPUConstants.LoadOp.Load,
|
|
2158
|
+
stencilStoreOp: !depthTextureHasStencil ? undefined : WebGPUConstants.StoreOp.Store,
|
|
2154
2159
|
}
|
|
2155
2160
|
: undefined,
|
|
2156
2161
|
occlusionQuerySet: ((_b = this._occlusionQuery) === null || _b === void 0 ? void 0 : _b.hasQueries) ? this._occlusionQuery.querySet : undefined,
|
|
@@ -2236,7 +2241,11 @@ var WebGPUEngine = /** @class */ (function (_super) {
|
|
|
2236
2241
|
: undefined;
|
|
2237
2242
|
this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.depthLoadOp = mustClearDepth ? WebGPUConstants.LoadOp.Clear : WebGPUConstants.LoadOp.Load;
|
|
2238
2243
|
this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.stencilClearValue = mustClearStencil ? this._clearStencilValue : undefined;
|
|
2239
|
-
this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.stencilLoadOp =
|
|
2244
|
+
this._mainRenderPassWrapper.renderPassDescriptor.depthStencilAttachment.stencilLoadOp = !this.isStencilEnable
|
|
2245
|
+
? undefined
|
|
2246
|
+
: mustClearStencil
|
|
2247
|
+
? WebGPUConstants.LoadOp.Clear
|
|
2248
|
+
: WebGPUConstants.LoadOp.Load;
|
|
2240
2249
|
this._mainRenderPassWrapper.renderPassDescriptor.occlusionQuerySet = ((_a = this._occlusionQuery) === null || _a === void 0 ? void 0 : _a.hasQueries) ? this._occlusionQuery.querySet : undefined;
|
|
2241
2250
|
this._swapChainTexture = this._context.getCurrentTexture();
|
|
2242
2251
|
this._mainRenderPassWrapper.colorAttachmentGPUTextures[0].set(this._swapChainTexture);
|