@onerjs/core 8.54.4 → 8.54.6
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/Native/nativeHelpers.js +5 -0
- package/Engines/Native/nativeHelpers.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.cubeTexture.pure.js +1 -1
- package/Engines/WebGPU/Extensions/engine.cubeTexture.pure.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.rawTexture.pure.js +2 -2
- package/Engines/WebGPU/Extensions/engine.rawTexture.pure.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheRenderPipeline.d.ts +1 -0
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js +18 -4
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheTextureView.d.ts +13 -0
- package/Engines/WebGPU/webgpuCacheTextureView.js +32 -0
- package/Engines/WebGPU/webgpuCacheTextureView.js.map +1 -0
- package/Engines/WebGPU/webgpuRenderTargetWrapper.d.ts +10 -0
- package/Engines/WebGPU/webgpuRenderTargetWrapper.js +10 -0
- package/Engines/WebGPU/webgpuRenderTargetWrapper.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.pure.js +57 -4
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.pure.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -1
- package/Engines/WebGPU/webgpuTextureManager.js +4 -2
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/abstractEngine.pure.js +2 -2
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engineCapabilities.d.ts +5 -0
- package/Engines/engineCapabilities.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +5 -0
- package/Engines/thinNativeEngine.pure.js +52 -10
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +1 -0
- package/Engines/webgpuEngine.pure.js +22 -8
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.d.ts +95 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js +169 -4
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.pure.d.ts +21 -6
- package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.pure.js +28 -26
- package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.pure.d.ts +30 -2
- package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.pure.js +111 -29
- package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.pure.d.ts +56 -2
- package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.pure.js +99 -14
- package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js +10 -2
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js +21 -1
- package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.d.ts +18 -0
- package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js +29 -2
- package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.d.ts +15 -0
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js +44 -7
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.d.ts +9 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js +9 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.d.ts +7 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js +8 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.d.ts +5 -0
- package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.js +8 -0
- package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.pure.d.ts +37 -0
- package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.pure.js +44 -0
- package/FlowGraph/Blocks/Event/flowGraphStopEventPropagationBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Event/index.d.ts +1 -0
- package/FlowGraph/Blocks/Event/index.js +1 -0
- package/FlowGraph/Blocks/Event/index.js.map +1 -1
- package/FlowGraph/Blocks/Event/pure.d.ts +1 -0
- package/FlowGraph/Blocks/Event/pure.js +1 -0
- package/FlowGraph/Blocks/Event/pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.pure.d.ts +4 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.pure.js +67 -2
- package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.d.ts +13 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js +102 -7
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js +5 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js +5 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.d.ts +11 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js +21 -3
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.pure.js +25 -4
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.js +18 -0
- package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +9 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js +9 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -1
- package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +17 -3
- package/FlowGraph/CustomTypes/flowGraphMatrix.js +27 -21
- package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
- package/FlowGraph/flowGraphContext.d.ts +23 -0
- package/FlowGraph/flowGraphContext.js +29 -0
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphCoordinator.d.ts +58 -1
- package/FlowGraph/flowGraphCoordinator.js +72 -0
- package/FlowGraph/flowGraphCoordinator.js.map +1 -1
- package/FlowGraph/flowGraphDelayRegistry.d.ts +31 -0
- package/FlowGraph/flowGraphDelayRegistry.js +50 -0
- package/FlowGraph/flowGraphDelayRegistry.js.map +1 -0
- package/FlowGraph/flowGraphHostResolver.d.ts +69 -0
- package/FlowGraph/flowGraphHostResolver.js +25 -0
- package/FlowGraph/flowGraphHostResolver.js.map +1 -0
- package/FlowGraph/flowGraphMath.d.ts +48 -1
- package/FlowGraph/flowGraphMath.js +169 -4
- package/FlowGraph/flowGraphMath.js.map +1 -1
- package/FlowGraph/flowGraphPathConverterComponent.d.ts +14 -3
- package/FlowGraph/flowGraphPathConverterComponent.js +110 -18
- package/FlowGraph/flowGraphPathConverterComponent.js.map +1 -1
- package/FlowGraph/flowGraphSignalConnection.pure.js +7 -1
- package/FlowGraph/flowGraphSignalConnection.pure.js.map +1 -1
- package/FlowGraph/index.d.ts +2 -0
- package/FlowGraph/index.js +2 -0
- package/FlowGraph/index.js.map +1 -1
- package/FlowGraph/pure.d.ts +2 -0
- package/FlowGraph/pure.js +2 -0
- package/FlowGraph/pure.js.map +1 -1
- package/Materials/Node/nodeMaterial.pure.d.ts +3 -1
- package/Materials/Node/nodeMaterial.pure.js +18 -1
- package/Materials/Node/nodeMaterial.pure.js.map +1 -1
- package/Materials/Textures/envCubeTexture.pure.js +7 -2
- package/Materials/Textures/envCubeTexture.pure.js.map +1 -1
- package/Materials/materialHelper.functions.d.ts +14 -0
- package/Materials/materialHelper.functions.js +67 -0
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Maths/math.vector.pure.d.ts +11 -1
- package/Maths/math.vector.pure.js +13 -0
- package/Maths/math.vector.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +216 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +714 -67
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +81 -4
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +466 -52
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.d.ts +19 -0
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js +24 -0
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js +31 -6
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +5 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js.map +1 -1
- package/Meshes/abstractMesh.pure.js +1 -0
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/mesh.pure.js +5 -0
- package/Meshes/mesh.pure.js.map +1 -1
- package/Meshes/transformNode.pure.js +1 -0
- package/Meshes/transformNode.pure.js.map +1 -1
- package/Misc/areaLightsTextureTools.js +1 -1
- package/Misc/areaLightsTextureTools.js.map +1 -1
- package/Misc/greasedLineTools.js +1 -1
- package/Misc/greasedLineTools.js.map +1 -1
- package/Misc/tools.pure.js +14 -2
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +66 -1
- package/Particles/gpuParticleSystem.pure.js +189 -49
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Physics/v2/characterController.js +69 -17
- package/Physics/v2/characterController.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/fsr1RenderingPipeline.d.ts +79 -0
- package/PostProcesses/RenderPipeline/Pipelines/fsr1RenderingPipeline.js +171 -0
- package/PostProcesses/RenderPipeline/Pipelines/fsr1RenderingPipeline.js.map +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/index.d.ts +5 -0
- package/PostProcesses/RenderPipeline/Pipelines/index.js +6 -0
- package/PostProcesses/RenderPipeline/Pipelines/index.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/pure.d.ts +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/pure.js +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/pure.js.map +1 -1
- package/PostProcesses/thinFSR1SharpenPostProcess.d.ts +32 -0
- package/PostProcesses/thinFSR1SharpenPostProcess.js +58 -0
- package/PostProcesses/thinFSR1SharpenPostProcess.js.map +1 -0
- package/PostProcesses/thinFSR1UpscalePostProcess.d.ts +37 -0
- package/PostProcesses/thinFSR1UpscalePostProcess.js +68 -0
- package/PostProcesses/thinFSR1UpscalePostProcess.js.map +1 -0
- package/Shaders/ShadersInclude/ffxFunctions.d.ts +5 -0
- package/Shaders/ShadersInclude/ffxFunctions.js +18 -0
- package/Shaders/ShadersInclude/ffxFunctions.js.map +1 -0
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js +2 -2
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrIblFunctions.js +1 -6
- package/Shaders/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/Shaders/fsr1Sharpen.fragment.d.ts +5 -0
- package/Shaders/fsr1Sharpen.fragment.js +26 -0
- package/Shaders/fsr1Sharpen.fragment.js.map +1 -0
- package/Shaders/fsr1Upscale.fragment.d.ts +5 -0
- package/Shaders/fsr1Upscale.fragment.js +77 -0
- package/Shaders/fsr1Upscale.fragment.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/ffxFunctions.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/ffxFunctions.js +18 -0
- package/ShadersWGSL/ShadersInclude/ffxFunctions.js.map +1 -0
- package/ShadersWGSL/fsr1Sharpen.fragment.d.ts +5 -0
- package/ShadersWGSL/fsr1Sharpen.fragment.js +34 -0
- package/ShadersWGSL/fsr1Sharpen.fragment.js.map +1 -0
- package/ShadersWGSL/fsr1Upscale.fragment.d.ts +5 -0
- package/ShadersWGSL/fsr1Upscale.fragment.js +68 -0
- package/ShadersWGSL/fsr1Upscale.fragment.js.map +1 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +3 -9
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js +4 -11
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -1
- package/XR/features/WebXRAbstractFeature.d.ts +9 -0
- package/XR/features/WebXRAbstractFeature.js +16 -0
- package/XR/features/WebXRAbstractFeature.js.map +1 -1
- package/XR/features/WebXRDepthSensing.pure.d.ts +7 -0
- package/XR/features/WebXRDepthSensing.pure.js +350 -39
- package/XR/features/WebXRDepthSensing.pure.js.map +1 -1
- package/XR/features/WebXRImageTracking.pure.js.map +1 -1
- package/XR/features/WebXRLayers.pure.d.ts +6 -5
- package/XR/features/WebXRLayers.pure.js +65 -8
- package/XR/features/WebXRLayers.pure.js.map +1 -1
- package/XR/features/WebXRRawCameraAccess.pure.js +9 -2
- package/XR/features/WebXRRawCameraAccess.pure.js.map +1 -1
- package/XR/features/WebXRSpaceWarp.pure.d.ts +0 -1
- package/XR/features/WebXRSpaceWarp.pure.js +13 -4
- package/XR/features/WebXRSpaceWarp.pure.js.map +1 -1
- package/XR/features/WebXRWalkingLocomotion.pure.js.map +1 -1
- package/XR/webXRCamera.js +27 -0
- package/XR/webXRCamera.js.map +1 -1
- package/XR/webXRFeatureWarningRegistry.d.ts +14 -0
- package/XR/webXRFeatureWarningRegistry.js +19 -0
- package/XR/webXRFeatureWarningRegistry.js.map +1 -0
- package/XR/webXRFeaturesManager.d.ts +5 -0
- package/XR/webXRFeaturesManager.js +23 -4
- package/XR/webXRFeaturesManager.js.map +1 -1
- package/XR/webXRGraphicsBinding.d.ts +17 -10
- package/XR/webXRGraphicsBinding.js +8 -5
- package/XR/webXRGraphicsBinding.js.map +1 -1
- package/XR/webXRSessionManager.d.ts +3 -5
- package/XR/webXRSessionManager.js +1 -3
- package/XR/webXRSessionManager.js.map +1 -1
- package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +21 -5
- package/XR/webXRWebGPURenderTargetTextureProvider.js +38 -10
- package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -1
- package/package.json +1 -1
|
@@ -224,6 +224,7 @@ export declare class WebGPUEngine extends ThinWebGPUEngine {
|
|
|
224
224
|
/** @internal */
|
|
225
225
|
_cacheSampler: WebGPUCacheSampler;
|
|
226
226
|
private _cacheBindGroups;
|
|
227
|
+
private _cacheTextureViews;
|
|
227
228
|
private _emptyVertexBuffer;
|
|
228
229
|
/** @internal */
|
|
229
230
|
_mrtAttachments: number[];
|
|
@@ -26,6 +26,7 @@ import { WebGPUDepthCullingState } from "./WebGPU/webgpuDepthCullingState.js";
|
|
|
26
26
|
import { WebGPUMaterialContext } from "./WebGPU/webgpuMaterialContext.js";
|
|
27
27
|
import { WebGPUDrawContext } from "./WebGPU/webgpuDrawContext.js";
|
|
28
28
|
import { WebGPUCacheBindGroups } from "./WebGPU/webgpuCacheBindGroups.js";
|
|
29
|
+
import { WebGPUCacheTextureView } from "./WebGPU/webgpuCacheTextureView.js";
|
|
29
30
|
import { WebGPUClearQuad } from "./WebGPU/webgpuClearQuad.pure.js";
|
|
30
31
|
import { WebGPURenderItemBlendColor, WebGPURenderItemScissor, WebGPURenderItemStencilRef, WebGPURenderItemViewport, WebGPUBundleList } from "./WebGPU/webgpuBundleList.js";
|
|
31
32
|
import { WebGPUTimestampQuery } from "./WebGPU/webgpuTimestampQuery.js";
|
|
@@ -492,6 +493,7 @@ export class WebGPUEngine extends ThinWebGPUEngine {
|
|
|
492
493
|
this._textureHelper = new WebGPUTextureManager(this, this._device, this._bufferManager, this._deviceEnabledExtensions);
|
|
493
494
|
this._cacheSampler = new WebGPUCacheSampler(this._device);
|
|
494
495
|
this._cacheBindGroups = new WebGPUCacheBindGroups(this._device, this._cacheSampler, this);
|
|
496
|
+
this._cacheTextureViews = new WebGPUCacheTextureView();
|
|
495
497
|
this._timestampQuery = new WebGPUTimestampQuery(this, this._device, this._bufferManager);
|
|
496
498
|
this._occlusionQuery = this._device.createQuerySet ? new WebGPUOcclusionQuery(this, this._device, this._bufferManager) : undefined;
|
|
497
499
|
this._bundleList = new WebGPUBundleList(this._device);
|
|
@@ -569,6 +571,7 @@ export class WebGPUEngine extends ThinWebGPUEngine {
|
|
|
569
571
|
maxVaryingVectors: this._deviceLimits.maxInterStageShaderVariables,
|
|
570
572
|
maxFragmentUniformVectors: Math.floor(this._deviceLimits.maxUniformBufferBindingSize / 4),
|
|
571
573
|
maxVertexUniformVectors: Math.floor(this._deviceLimits.maxUniformBufferBindingSize / 4),
|
|
574
|
+
maxUniformBuffersPerShaderStage: this._deviceLimits.maxUniformBuffersPerShaderStage,
|
|
572
575
|
shaderFloatPrecision: 23, // WGSL always uses IEEE-754 binary32 floats (which have 23 bits of significand)
|
|
573
576
|
standardDerivatives: true,
|
|
574
577
|
astc: (this._deviceEnabledExtensions.indexOf("texture-compression-astc" /* WebGPUConstants.FeatureName.TextureCompressionASTC */) >= 0 ? true : undefined),
|
|
@@ -2377,11 +2380,11 @@ export class WebGPUEngine extends ThinWebGPUEngine {
|
|
|
2377
2380
|
let format;
|
|
2378
2381
|
if (useMSAA) {
|
|
2379
2382
|
const gpuMSAATexture = gpuDepthStencilWrapper?.getMSAATexture(sampleCount);
|
|
2380
|
-
depthStencilView = gpuMSAATexture
|
|
2383
|
+
depthStencilView = gpuMSAATexture ? this._cacheTextureViews.getView(gpuMSAATexture, this._rttRenderPassWrapper.depthAttachmentViewDescriptor) : undefined;
|
|
2381
2384
|
format = gpuMSAATexture?.format;
|
|
2382
2385
|
}
|
|
2383
2386
|
if (!depthStencilView && gpuDepthStencilTexture) {
|
|
2384
|
-
depthStencilView =
|
|
2387
|
+
depthStencilView = this._cacheTextureViews.getView(gpuDepthStencilTexture, this._rttRenderPassWrapper.depthAttachmentViewDescriptor);
|
|
2385
2388
|
}
|
|
2386
2389
|
if (!format && gpuDepthStencilWrapper) {
|
|
2387
2390
|
format = gpuDepthStencilWrapper.format;
|
|
@@ -2429,8 +2432,8 @@ export class WebGPUEngine extends ThinWebGPUEngine {
|
|
|
2429
2432
|
baseArrayLayer: 0,
|
|
2430
2433
|
};
|
|
2431
2434
|
const isRtInteger = mrtTexture.type === 7 || mrtTexture.type === 5;
|
|
2432
|
-
const colorTextureView =
|
|
2433
|
-
const colorMSAATextureView = gpuMSAATexture
|
|
2435
|
+
const colorTextureView = this._cacheTextureViews.getView(gpuMRTTexture, viewDescriptor);
|
|
2436
|
+
const colorMSAATextureView = gpuMSAATexture ? this._cacheTextureViews.getView(gpuMSAATexture, msaaViewDescriptor) : undefined;
|
|
2434
2437
|
colorAttachments.push({
|
|
2435
2438
|
view: colorMSAATextureView ? colorMSAATextureView : colorTextureView,
|
|
2436
2439
|
resolveTarget: gpuMSAATexture && !rtWrapper.disableAutomaticMSAAResolve && rtWrapper.resolveMSAAColors ? colorTextureView : undefined,
|
|
@@ -2457,8 +2460,10 @@ export class WebGPUEngine extends ThinWebGPUEngine {
|
|
|
2457
2460
|
this._rttRenderPassWrapper.colorAttachmentViewDescriptor.baseArrayLayer = 0;
|
|
2458
2461
|
}
|
|
2459
2462
|
const gpuMSAATexture = useMSAA ? gpuWrapper.getMSAATexture(sampleCount, layerIndex) : undefined;
|
|
2460
|
-
const colorTextureView =
|
|
2461
|
-
const colorMSAATextureView = gpuMSAATexture
|
|
2463
|
+
const colorTextureView = this._cacheTextureViews.getView(gpuTexture, this._rttRenderPassWrapper.colorAttachmentViewDescriptor);
|
|
2464
|
+
const colorMSAATextureView = gpuMSAATexture
|
|
2465
|
+
? this._cacheTextureViews.getView(gpuMSAATexture, this._rttRenderPassWrapper.colorAttachmentViewDescriptor)
|
|
2466
|
+
: undefined;
|
|
2462
2467
|
const isRtInteger = internalTexture.type === 7 || internalTexture.type === 5;
|
|
2463
2468
|
colorAttachments.push({
|
|
2464
2469
|
view: colorMSAATextureView ? colorMSAATextureView : colorTextureView,
|
|
@@ -2790,7 +2795,12 @@ export class WebGPUEngine extends ThinWebGPUEngine {
|
|
|
2790
2795
|
this.setZOffset(zOffset);
|
|
2791
2796
|
this.setZOffsetUnits(zOffsetUnits);
|
|
2792
2797
|
// Front face
|
|
2793
|
-
|
|
2798
|
+
// Render targets are drawn Y-flipped (see the InternalsUBO yFactor in _draw), so their triangle
|
|
2799
|
+
// winding is reversed here to compensate and keep the same faces visible. XR projection-layer targets
|
|
2800
|
+
// opt out of that flip (_disableEngineYFlip) because the compositor presents them directly, so they
|
|
2801
|
+
// keep the main-framebuffer winding.
|
|
2802
|
+
const invertYRenderTarget = !!this._currentRenderTarget && !this._currentRenderTarget._disableEngineYFlip;
|
|
2803
|
+
const frontFace = reverseSide ? (invertYRenderTarget ? 1 : 2) : invertYRenderTarget ? 2 : 1;
|
|
2794
2804
|
if (this._depthCullingState.frontFace !== frontFace || force) {
|
|
2795
2805
|
this._depthCullingState.frontFace = frontFace;
|
|
2796
2806
|
}
|
|
@@ -2817,7 +2827,11 @@ export class WebGPUEngine extends ThinWebGPUEngine {
|
|
|
2817
2827
|
const bundleList = this._bundleList;
|
|
2818
2828
|
this.applyStates();
|
|
2819
2829
|
const webgpuPipelineContext = this._currentEffect._pipelineContext;
|
|
2820
|
-
|
|
2830
|
+
// Render targets are rendered Y-flipped (yFactor = -1) so a later-sampled RTT matches the WebGL
|
|
2831
|
+
// texture-space convention. XR projection-layer targets (_disableEngineYFlip) are presented directly by
|
|
2832
|
+
// the compositor and must be rendered upright, so they use the non-inverting UBO like the canvas.
|
|
2833
|
+
const invertYRenderTarget = !!this._currentRenderTarget && !this._currentRenderTarget._disableEngineYFlip;
|
|
2834
|
+
this.bindUniformBufferBase(invertYRenderTarget ? this._ubInvertY : this._ubDontInvertY, 0, WebGPUShaderProcessor.InternalsUBOName);
|
|
2821
2835
|
this._currentDrawContext.setVertexPulling(this._currentMaterialContext.useVertexPulling, webgpuPipelineContext, this._currentVertexBuffers, this._cacheRenderPipeline.indexBuffer, // don't use this._currentIndexBuffer, it will have been set to null by _drawArraysType!
|
|
2822
2836
|
this._currentOverrideVertexBuffers);
|
|
2823
2837
|
if (webgpuPipelineContext.uniformBuffer) {
|