@onerjs/core 9.0.0 → 9.0.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/Animations/animationGroup.pure.js.map +1 -1
- package/Cameras/targetCamera.pure.js +6 -1
- package/Cameras/targetCamera.pure.js.map +1 -1
- package/Engines/Native/nativeHardwareTexture.d.ts +8 -1
- package/Engines/Native/nativeHardwareTexture.js +7 -0
- package/Engines/Native/nativeHardwareTexture.js.map +1 -1
- package/Engines/Native/nativeHelpers.js +56 -1
- package/Engines/Native/nativeHelpers.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +37 -8
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.d.ts +40 -0
- package/Engines/Native/nativeRenderTargetWrapper.js +265 -5
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/Processors/shaderCodeCursor.d.ts +1 -0
- package/Engines/Processors/shaderCodeCursor.js +40 -3
- package/Engines/Processors/shaderCodeCursor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js +1 -0
- package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js.map +1 -1
- package/Engines/abstractEngine.pure.d.ts +15 -1
- package/Engines/abstractEngine.pure.js +12 -4
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.pure.d.ts +0 -1
- package/Engines/engine.pure.js +0 -7
- package/Engines/engine.pure.js.map +1 -1
- package/Engines/nativeEngine.pure.js +1 -1
- package/Engines/nativeEngine.pure.js.map +1 -1
- package/Engines/thinEngine.pure.d.ts +1 -0
- package/Engines/thinEngine.pure.js +13 -2
- package/Engines/thinEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +217 -17
- package/Engines/thinNativeEngine.pure.js +1431 -164
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/thinWebGPUEngine.js +6 -1
- package/Engines/thinWebGPUEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +12 -1
- package/Engines/webgpuEngine.pure.js +8 -0
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.d.ts +10 -0
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js +24 -12
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.d.ts +7 -0
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js +43 -0
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.d.ts +16 -4
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js +20 -6
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js +3 -3
- package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.d.ts +7 -7
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js +52 -35
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.d.ts +12 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js +8 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js +4 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.d.ts +12 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js +5 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.d.ts +2 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js +14 -2
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.d.ts +5 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js +23 -8
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js.map +1 -1
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.d.ts +5 -0
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.js +7 -0
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.js.map +1 -1
- package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +10 -0
- package/FlowGraph/CustomTypes/flowGraphMatrix.js +14 -0
- package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +2 -1
- package/FlowGraph/flowGraph.js +3 -2
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphAnimationHelpers.d.ts +24 -0
- package/FlowGraph/flowGraphAnimationHelpers.js +21 -0
- package/FlowGraph/flowGraphAnimationHelpers.js.map +1 -0
- package/FlowGraph/flowGraphContext.js +1 -0
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphValidator.js +0 -4
- package/FlowGraph/flowGraphValidator.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/FlowGraph/serialization.d.ts +2 -2
- package/FlowGraph/serialization.js +2 -2
- package/FlowGraph/serialization.js.map +1 -1
- package/FlowGraph/typeDefinitions.d.ts +1 -1
- package/FlowGraph/typeDefinitions.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.d.ts +1 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js +4 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.d.ts +54 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js +155 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.d.ts +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.js +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/allBlocks.pure.js +2 -0
- package/FrameGraph/Node/Blocks/allBlocks.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/index.d.ts +1 -0
- package/FrameGraph/Node/Blocks/index.js +1 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Node/Blocks/pure.d.ts +1 -0
- package/FrameGraph/Node/Blocks/pure.js +1 -0
- package/FrameGraph/Node/Blocks/pure.js.map +1 -1
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.d.ts +62 -0
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.js +159 -0
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +3 -1
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
- package/FrameGraph/frameGraph.d.ts +4 -0
- package/FrameGraph/frameGraph.js +14 -0
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/index.d.ts +1 -0
- package/FrameGraph/index.js +1 -0
- package/FrameGraph/index.js.map +1 -1
- package/FrameGraph/pure.d.ts +1 -0
- package/FrameGraph/pure.js +1 -0
- package/FrameGraph/pure.js.map +1 -1
- package/Inputs/scene.inputManager.js +1 -1
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.d.ts +5 -0
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.js +22 -1
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.js +7 -3
- package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.d.ts +7 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js +8 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.d.ts +54 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js +81 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.d.ts +7 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js +8 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.d.ts +60 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js +90 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.d.ts +31 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js +98 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +2 -2
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.d.ts +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js +4 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.d.ts +83 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js +191 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.d.ts +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js +4 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.d.ts +62 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js +125 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js.map +1 -0
- package/Materials/GaussianSplatting/pure.d.ts +4 -0
- package/Materials/GaussianSplatting/pure.js +4 -0
- package/Materials/GaussianSplatting/pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.d.ts +1 -0
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +12 -0
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.pure.d.ts +1 -0
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js +31 -7
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
- package/Materials/Textures/mirrorTexture.pure.js +3 -1
- package/Materials/Textures/mirrorTexture.pure.js.map +1 -1
- package/Materials/Textures/texture.pure.js +1 -1
- package/Materials/Textures/texture.pure.js.map +1 -1
- package/Materials/effectRenderer.pure.d.ts +4 -0
- package/Materials/effectRenderer.pure.js +3 -2
- package/Materials/effectRenderer.pure.js.map +1 -1
- package/Materials/index.d.ts +4 -0
- package/Materials/index.js +4 -0
- package/Materials/index.js.map +1 -1
- package/Materials/material.pure.js +25 -12
- package/Materials/material.pure.js.map +1 -1
- package/Materials/pure.d.ts +4 -0
- package/Materials/pure.js +4 -0
- package/Materials/pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +8 -0
- package/Materials/standardMaterial.pure.js +24 -2
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Meshes/Builders/polygonBuilder.pure.js +1 -1
- package/Meshes/Builders/polygonBuilder.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.d.ts +8 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.js +11 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.d.ts +231 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js +1212 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.d.ts +14 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js +15 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.d.ts +285 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js +812 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +2 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +160 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +219 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +32 -4
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +114 -21
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/pure.d.ts +2 -0
- package/Meshes/GaussianSplatting/pure.js +2 -0
- package/Meshes/GaussianSplatting/pure.js.map +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +25 -11
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/abstractMesh.pure.d.ts +12 -0
- package/Meshes/abstractMesh.pure.js +32 -0
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/index.d.ts +1 -0
- package/Meshes/index.js +1 -0
- package/Meshes/index.js.map +1 -1
- package/Meshes/pure.d.ts +1 -0
- package/Meshes/pure.js +1 -0
- package/Meshes/pure.js.map +1 -1
- package/Meshes/subMesh.pure.d.ts +11 -2
- package/Meshes/subMesh.pure.js +20 -5
- package/Meshes/subMesh.pure.js.map +1 -1
- package/Meshes/thinInstanceMesh.pure.js +1 -0
- package/Meshes/thinInstanceMesh.pure.js.map +1 -1
- package/Misc/andOrNotEvaluator.js +4 -0
- package/Misc/andOrNotEvaluator.js.map +1 -1
- package/Misc/minMaxReducer.pure.d.ts +6 -0
- package/Misc/minMaxReducer.pure.js +10 -0
- package/Misc/minMaxReducer.pure.js.map +1 -1
- package/Misc/thinMinMaxReducer.d.ts +19 -2
- package/Misc/thinMinMaxReducer.js +74 -21
- package/Misc/thinMinMaxReducer.js.map +1 -1
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js +19 -7
- package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +2 -0
- package/Particles/gpuParticleSystem.pure.js +12 -4
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Particles/particle.js +3 -2
- package/Particles/particle.js.map +1 -1
- package/Particles/solidParticleSystem.js +7 -1
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.function.d.ts +6 -0
- package/Particles/thinParticleSystem.function.js +144 -88
- package/Particles/thinParticleSystem.function.js.map +1 -1
- package/Particles/thinParticleSystem.pure.d.ts +6 -0
- package/Particles/thinParticleSystem.pure.js +70 -9
- package/Particles/thinParticleSystem.pure.js.map +1 -1
- package/Physics/v2/ragdoll.d.ts +2 -4
- package/Physics/v2/ragdoll.js +11 -4
- package/Physics/v2/ragdoll.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +12 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +43 -18
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/depthRenderer.pure.d.ts +9 -0
- package/Rendering/depthRenderer.pure.js +12 -0
- package/Rendering/depthRenderer.pure.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +4 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js +6 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +4 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +8 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +3 -0
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
- package/Rendering/geometryBufferRenderer.pure.js +4 -1
- package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
- package/Rendering/prePassRenderer.pure.js +3 -3
- package/Rendering/prePassRenderer.pure.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js +3 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js +27 -3
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/oitDeclaration.js +1 -1
- package/Shaders/ShadersInclude/oitDeclaration.js.map +1 -1
- package/Shaders/minmaxRedux.fragment.js +6 -1
- package/Shaders/minmaxRedux.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js +65 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js +17 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.d.ts +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +6 -78
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js +2 -2
- package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js +79 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +27 -3
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js +22 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js.map +1 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js +19 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js.map +1 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js +21 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js.map +1 -0
- package/ShadersWGSL/gaussianSplatting.vertex.js +2 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingVoxel.vertex.js +2 -1
- package/ShadersWGSL/gaussianSplattingVoxel.vertex.js.map +1 -1
- package/ShadersWGSL/gpsHiZBuild.compute.d.ts +5 -0
- package/ShadersWGSL/gpsHiZBuild.compute.js +16 -0
- package/ShadersWGSL/gpsHiZBuild.compute.js.map +1 -0
- package/ShadersWGSL/gpsPartition.compute.d.ts +5 -0
- package/ShadersWGSL/gpsPartition.compute.js +27 -0
- package/ShadersWGSL/gpsPartition.compute.js.map +1 -0
- package/ShadersWGSL/gpsPreprocess.compute.d.ts +5 -0
- package/ShadersWGSL/gpsPreprocess.compute.js +86 -0
- package/ShadersWGSL/gpsPreprocess.compute.js.map +1 -0
- package/ShadersWGSL/gpsResolve.compute.d.ts +5 -0
- package/ShadersWGSL/gpsResolve.compute.js +41 -0
- package/ShadersWGSL/gpsResolve.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanAdd.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanAdd.compute.js +22 -0
- package/ShadersWGSL/gpsScanAdd.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanBlocks.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanBlocks.compute.js +23 -0
- package/ShadersWGSL/gpsScanBlocks.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanSums.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanSums.compute.js +30 -0
- package/ShadersWGSL/gpsScanSums.compute.js.map +1 -0
- package/ShadersWGSL/gpsSplat.compute.d.ts +5 -0
- package/ShadersWGSL/gpsSplat.compute.js +37 -0
- package/ShadersWGSL/gpsSplat.compute.js.map +1 -0
- package/ShadersWGSL/minmaxRedux.fragment.js +20 -3
- package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
- package/XR/features/WebXRSpaceWarp.pure.js +2 -1
- package/XR/features/WebXRSpaceWarp.pure.js.map +1 -1
- package/assetContainer.d.ts +1 -0
- package/assetContainer.js +5 -1
- package/assetContainer.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +13 -2
- package/scene.pure.js +28 -4
- package/scene.pure.js.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gaussianPointSplattingController.pure.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAG7D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAGxC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iEAAiE,CAAC;AAC5G,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,C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,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,UAAU,wCAAwC;IACpD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IACnB,2CAA2C,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,gCAAgC,CAAC,IAAI,CAAC,CAAC,CAAC;AACtG,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type Nullable } from \"core/types\";\nimport { Scene } from \"core/scene.pure\";\nimport { type Observer } from \"core/Misc/observable\";\nimport { type Camera } from \"core/Cameras/camera.pure\";\nimport { Matrix, Quaternion } from \"core/Maths/math.vector.pure\";\nimport { Material } from \"core/Materials/material.pure\";\nimport { type DepthRenderer } from \"core/Rendering/depthRenderer.pure\";\nimport { GaussianSplattingMaterial } from \"core/Materials/GaussianSplatting/gaussianSplattingMaterial.pure\";\nimport { Constants } from \"core/Engines/constants\";\nimport { type AbstractEngine } from \"core/Engines/abstractEngine.pure\";\nimport { Mesh } from \"core/Meshes/mesh.pure\";\nimport { VertexData } from \"core/Meshes/mesh.vertexData\";\nimport { Logger } from \"core/Misc/logger\";\nimport { ToHalfFloat } from \"core/Misc/textureTools\";\nimport { GaussianPointSplattingRenderer, _GetPackedShBytesPerSplat, _HasGaussianPointSplattingProjectedDepth } from \"./gaussianPointSplattingRenderer.pure\";\nimport { GaussianPointSplattingBlitMaterial } from \"core/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure\";\nimport { GaussianPointSplattingDepthBlitMaterial } from \"core/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure\";\nimport { GaussianSplattingDebugMaterialPlugin } from \"core/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure\";\nimport { GaussianSplattingSolidColorMaterialPlugin } from \"core/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure\";\nimport { GaussianSplattingSizeMaterialPlugin } from \"core/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure\";\nimport { GaussianSplattingOverdrawMaterialPlugin } from \"core/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure\";\nimport { RegisterEnginesWebGPUExtensionsEngineComputeShader } from \"core/Engines/WebGPU/Extensions/engine.computeShader.pure\";\nimport {\n _SetGaussianPointSplattingControllerFactory,\n type GaussianSplattingMesh,\n type IGaussianPointSplattingController,\n type IGaussianPointSplattingProgress,\n} from \"./gaussianSplattingMesh.pure\";\n\nconst _BytesPerSplat = 32;\n\n// Loaded on demand to keep this module side-effect free; the wrapper imports them eagerly.\nlet _DependenciesReady = false;\nlet _DependenciesPromise: Nullable<Promise<void>> = null;\nlet _DependenciesFailed = false;\n\nasync function _LoadDependenciesAsync(): Promise<void> {\n try {\n await Promise.all([\n import(\"../../ShadersWGSL/gpsPreprocess.compute\"),\n import(\"../../ShadersWGSL/gpsScanBlocks.compute\"),\n import(\"../../ShadersWGSL/gpsScanSums.compute\"),\n import(\"../../ShadersWGSL/gpsScanAdd.compute\"),\n import(\"../../ShadersWGSL/gpsPartition.compute\"),\n import(\"../../ShadersWGSL/gpsSplat.compute\"),\n import(\"../../ShadersWGSL/gpsResolve.compute\"),\n import(\"../../ShadersWGSL/gpsHiZBuild.compute\"),\n import(\"../../ShadersWGSL/gaussianPointSplattingBlit.vertex\"),\n import(\"../../ShadersWGSL/gaussianPointSplattingBlit.fragment\"),\n import(\"../../ShadersWGSL/gaussianPointSplattingDepthBlit.fragment\"),\n ]);\n _DependenciesReady = true;\n } catch (error) {\n _DependenciesFailed = true;\n _DependenciesPromise = null;\n Logger.Error(`GaussianSplattingMesh: failed to load point-splatting shaders: ${String(error)}`);\n }\n}\n\nfunction _LoadDependencies(): void {\n if (!_DependenciesReady && !_DependenciesPromise) {\n _DependenciesFailed = false;\n _DependenciesPromise = _LoadDependenciesAsync();\n }\n}\n\nconst _F32Scratch = /*#__PURE__*/ new Float32Array(1);\nconst _U32Scratch = /*#__PURE__*/ new Uint32Array(_F32Scratch.buffer);\n\n/**\n * Packs two floats as half-floats into one u32 (a in the low 16 bits).\n * @param a value for the low 16 bits\n * @param b value for the high 16 bits\n * @returns the packed u32\n */\nfunction _Pack2HalfFloat(a: number, b: number): number {\n return (ToHalfFloat(a) | (ToHalfFloat(b) << 16)) >>> 0;\n}\n\n/**\n * Owns the WebGPU compute point-splatting path of one {@link GaussianSplattingMesh}: decode, dispatch,\n * auto render scale, and the compositors that blit the result into the scene.\n *\n * The mesh never imports this module, so bundles without point splatting do not include it. It is enabled\n * by {@link RegisterGaussianPointSplattingController}, which the side-effect wrapper calls.\n */\nexport class GaussianPointSplattingController implements IGaussianPointSplattingController {\n private readonly _mesh: GaussianSplattingMesh;\n private readonly _scene: Scene;\n\n /**\n * Creates a point-splatting controller for a Gaussian Splatting mesh.\n * @param mesh the mesh whose splat data this controller renders\n */\n public constructor(mesh: GaussianSplattingMesh) {\n this._mesh = mesh;\n this._scene = mesh.getScene();\n }\n\n private _colorMode = false;\n private _depthMode = false;\n private readonly _projectionClipRange = new Float64Array(2);\n private _scale = 1;\n private _renderScale: number | \"auto\" = \"auto\";\n private _occlusionCulling = false;\n // Auto scale: N is measured once per generation, on a non-reset frame (the reset frame has no Hi-Z cull\n // and over-counts), then frozen so a converged image never mixes two render scales.\n private _autoN = 2;\n private _autoMeasuredGeneration = -1;\n private _lastRenderedGeneration = -1;\n private _autoRequestId = 0;\n private _budgetReadPending = false;\n private _resultReady = false;\n private _colorHistoryReady = false;\n private _colorUsesCameraTransform = false;\n private _cameraFrameId = -1;\n private _cameraId = -1;\n /** Whether the latest compute run succeeded; unlike `_resultReady`, not cleared at frame start. */\n private _progressReady = false;\n private _computedWidth = 0;\n private _computedHeight = 0;\n // Counters of the last dispatch, surfaced by `progress`.\n private _progressFrameCount = 0;\n private _progressGeneration = -1;\n private _progressCycleLength = 0;\n private _streamingWarned = false;\n private _sourceWarned = false;\n private _workloadWarned = false;\n private _invalidProjectionWarned = false;\n private _renderer: Nullable<GaussianPointSplattingRenderer> = null;\n private _blit: Nullable<GaussianPointSplattingBlitMaterial> = null;\n private _blitMesh: Nullable<Mesh> = null;\n private _depthBlit: Nullable<GaussianPointSplattingDepthBlitMaterial> = null;\n private _depthBlitMesh: Nullable<Mesh> = null;\n private _computeObserver: Nullable<Observer<Scene>> = null;\n private _cameraObserver: Nullable<Observer<Camera>> = null;\n private _restoreObserver: Nullable<Observer<AbstractEngine>> = null;\n private _splatCount = 0;\n private _partCount = 1;\n private _decodedPartCount = 0;\n private _decodedRevision = -1;\n private _decodedShDegree = -1;\n private _partLocalMin = new Float32Array(3);\n private _partLocalMax = new Float32Array(3);\n private _partScratch = new Float32Array(40);\n private _decodedSplatsData: Nullable<ArrayBuffer> = null;\n private readonly _vpMatrix = new Matrix();\n private readonly _cameraVpMatrix = new Matrix();\n private readonly _inverseProjection = new Matrix();\n private readonly _outputSize = { width: 1, height: 1 };\n private readonly _depthSpan: [number, number] = [0, 0];\n\n /** {@inheritDoc IGaussianPointSplattingController.colorRenderMode} */\n public get colorRenderMode(): boolean {\n return this._colorMode;\n }\n public set colorRenderMode(value: boolean) {\n if (value === this._colorMode) {\n return;\n }\n if (value && !this._scene.getEngine().isWebGPU) {\n Logger.Warn(\"GaussianSplattingMesh: point-splatting render mode requires a WebGPU engine; ignoring.\");\n return;\n }\n this._colorMode = value;\n if (!value) {\n this._colorHistoryReady = false;\n }\n if (value) {\n this._ensureCompute();\n this._enableColorBlit();\n } else {\n this._blitMesh?.setEnabled(false);\n this._releaseComputeIfIdle();\n }\n }\n\n /** {@inheritDoc IGaussianPointSplattingController.depthRenderMode} */\n public get depthRenderMode(): boolean {\n return this._depthMode;\n }\n public set depthRenderMode(value: boolean) {\n if (value === this._depthMode) {\n return;\n }\n if (value && !this._scene.getEngine().isWebGPU) {\n Logger.Warn(\"GaussianSplattingMesh: point-splatting depth render mode requires a WebGPU engine; ignoring.\");\n return;\n }\n this._depthMode = value;\n if (value) {\n this._ensureCompute();\n this._enableDepthBlit();\n } else {\n this._depthBlitMesh?.setEnabled(false);\n this._releaseComputeIfIdle();\n }\n }\n\n /** {@inheritDoc IGaussianPointSplattingController.progress} */\n public get progress(): Nullable<IGaussianPointSplattingProgress> {\n if (!this._computeActive || !this._progressReady || !this._renderer) {\n return null;\n }\n return {\n renderedFrameCount: this._progressFrameCount,\n accumulationVersion: this._progressGeneration,\n pixelCycleLength: this._progressCycleLength,\n };\n }\n\n /** True while either point-splatting mode is on, i.e. while the shared compute must run. */\n private get _computeActive(): boolean {\n return (this._colorMode || this._depthMode) && !_DependenciesFailed && !this._mesh._pointStreamingUnsupported && !this._hasUnsupportedSource;\n }\n\n /** GPU-only SOG and standalone streams have no retained splats for the compute decoder. */\n private get _hasUnsupportedSource(): boolean {\n return this._mesh.useSog || (!this._mesh._splatsData && this._mesh.getTotalVertices() > 0);\n }\n\n /** {@inheritDoc IGaussianPointSplattingController.pointScale} */\n public get pointScale(): number {\n return this._scale;\n }\n public set pointScale(value: number) {\n if (value === this._scale) {\n return;\n }\n this._scale = value;\n if (this._renderer) {\n this._renderer.pointScale = value;\n this._renderer.resetAccumulation();\n }\n }\n\n /** {@inheritDoc IGaussianPointSplattingController.occlusionCulling} */\n public get occlusionCulling(): boolean {\n return this._occlusionCulling;\n }\n public set occlusionCulling(value: boolean) {\n if (value === this._occlusionCulling) {\n return;\n }\n this._occlusionCulling = value;\n if (this._renderer) {\n this._renderer.occlusionCulling = value;\n this._renderer.resetAccumulation();\n }\n }\n\n /** Lazily builds the compute shared by the color and depth modes. Idempotent. */\n private _ensureCompute(): void {\n const engine = this._scene.getEngine();\n _LoadDependencies();\n if (!this._renderer) {\n // ComputeShader creates its compute context on construction, so the engine extension goes first.\n RegisterEnginesWebGPUExtensionsEngineComputeShader();\n this._renderer = new GaussianPointSplattingRenderer(engine);\n this._renderer.pointScale = this._scale;\n this._renderer.occlusionCulling = this._occlusionCulling;\n this._decodedSplatsData = null;\n }\n if (!this._mesh._pointStreamingUnsupported && !this._hasUnsupportedSource && this._isWorkloadSupported()) {\n this._syncData();\n }\n if (!this._computeObserver) {\n this._computeObserver = this._scene.onBeforeRenderObservable.add(() => {\n this._resultReady = false;\n });\n }\n if (!this._cameraObserver) {\n this._cameraObserver = this._scene.onBeforeCameraRenderObservable.add((camera) => {\n this._cameraFrameId = this._scene.getFrameId();\n this._cameraId = camera.uniqueId;\n this._cameraVpMatrix.copyFrom(this._scene.getTransformMatrix());\n });\n }\n if (!this._restoreObserver) {\n this._restoreObserver = engine.onContextRestoredObservable.add(() => {\n // Rebuilt storage buffers are empty, including the image sentinel and cached splat uploads.\n this._releaseComputeResources();\n this._releaseBlitResources();\n this._ensureCompute();\n if (this._colorMode) {\n this._enableColorBlit();\n }\n if (this._depthMode) {\n this._enableDepthBlit();\n }\n });\n }\n }\n\n /** Tears down the shared compute once neither point-splatting mode needs it anymore. */\n private _releaseComputeIfIdle(): void {\n if (this._colorMode || this._depthMode) {\n return;\n }\n if (this._computeObserver) {\n this._scene.onBeforeRenderObservable.remove(this._computeObserver);\n this._computeObserver = null;\n }\n if (this._cameraObserver) {\n this._scene.onBeforeCameraRenderObservable.remove(this._cameraObserver);\n this._cameraObserver = null;\n }\n if (this._restoreObserver) {\n this._scene.getEngine().onContextRestoredObservable.remove(this._restoreObserver);\n this._restoreObserver = null;\n }\n this._releaseComputeResources();\n }\n\n private _releaseComputeResources(): void {\n this._autoRequestId++;\n this._renderer?.dispose();\n this._renderer = null;\n this._decodedSplatsData = null;\n this._resultReady = false;\n this._colorHistoryReady = false;\n this._cameraFrameId = -1;\n this._progressReady = false;\n this._budgetReadPending = false;\n this._autoN = 2;\n this._autoMeasuredGeneration = -1;\n this._lastRenderedGeneration = -1;\n }\n\n private _releaseBlitResources(): void {\n this._blit?.dispose();\n this._blitMesh?.dispose();\n this._depthBlit?.dispose();\n this._depthBlitMesh?.dispose();\n this._blit = null;\n this._blitMesh = null;\n this._depthBlit = null;\n this._depthBlitMesh = null;\n }\n\n /** Builds a fullscreen compositor triangle. It is disabled and drawn manually, so its clip-space\n * geometry never leaks into other geometry passes.\n * @param name the compositor mesh name\n * @param material the blit material to render it with\n * @returns the created compositor mesh\n */\n private _createBlitMesh(name: string, material: Material): Mesh {\n const blitMesh = new Mesh(name, this._scene);\n const vd = new VertexData();\n vd.positions = [-1, -1, 0, 3, -1, 0, -1, 3, 0];\n vd.indices = [0, 1, 2];\n vd.applyToMesh(blitMesh);\n blitMesh.material = material;\n blitMesh.doNotSerialize = true;\n blitMesh.isPickable = false;\n blitMesh.doNotSyncBoundingInfo = true;\n blitMesh.setEnabled(false);\n blitMesh.reservedDataStore = { hidden: true };\n blitMesh.computeWorldMatrix(true);\n return blitMesh;\n }\n\n /** Lazily builds the color compositor. */\n private _enableColorBlit(): void {\n if (!this._blit) {\n this._blit = new GaussianPointSplattingBlitMaterial(this._mesh.name + \"_blit\", this._scene);\n // Internal compositor bound to storage buffers, which cannot round-trip through serialization.\n this._blit.doNotSerialize = true;\n }\n if (!this._blitMesh) {\n this._blitMesh = this._createBlitMesh(this._mesh.name + \"_blitMesh\", this._blit);\n }\n }\n\n /** Lazily builds the depth compositor. */\n private _enableDepthBlit(): void {\n if (!this._depthBlit) {\n this._depthBlit = new GaussianPointSplattingDepthBlitMaterial(this._mesh.name + \"_depthBlit\", this._scene);\n // Internal compositor bound to storage buffers, which cannot round-trip through serialization.\n this._depthBlit.doNotSerialize = true;\n }\n if (!this._depthBlitMesh) {\n this._depthBlitMesh = this._createBlitMesh(this._mesh.name + \"_depthBlitMesh\", this._depthBlit);\n }\n }\n\n /**\n * Checks the mesh's current data and output size against the device buffer limits, before anything is\n * decoded or allocated. Warns once when they do not fit.\n * @returns whether the workload fits\n */\n private _isWorkloadSupported(): boolean {\n const data = this._mesh._splatsData;\n const count = data ? (data.byteLength / _BytesPerSplat) | 0 : 0;\n const shDegree = this._mesh._shData?.length ? this._mesh._shDegree : 0;\n const { width, height } = this._getOutputSize();\n if (this._renderer!.supportsWorkload(count, shDegree, width, height)) {\n return true;\n }\n if (!this._workloadWarned) {\n this._workloadWarned = true;\n Logger.Warn(\n `GaussianSplattingMesh: point splatting needs storage buffers larger than this device allows (${count} splats at ${width}x${height}); falling back to the classic renderer.`\n );\n }\n return false;\n }\n\n /** Re-decodes the splat data if it changed since the last decode. */\n private _syncData(): void {\n // A partially filled atlas would decode unfinished entries as opaque splats at the origin.\n if (this._mesh._splatDataPending) {\n return;\n }\n const data = this._mesh._splatsData;\n const vc = data ? (data.byteLength / _BytesPerSplat) | 0 : 0;\n const pc = this._mesh.isCompound ? this._mesh.partCount : 1;\n const revision = this._mesh._splatDataRevision;\n const shDegree = this._mesh._shDegree;\n if (\n data === this._decodedSplatsData &&\n vc === this._splatCount &&\n pc === this._decodedPartCount &&\n revision === this._decodedRevision &&\n shDegree === this._decodedShDegree\n ) {\n return;\n }\n this._decodedSplatsData = data;\n this._decodedPartCount = pc;\n this._decodedRevision = revision;\n this._decodedShDegree = shDegree;\n if (!data || vc === 0) {\n this._splatCount = 0;\n return;\n }\n this._decode(data);\n }\n\n /**\n * Decodes raw `.splat` bytes into local-space per-Gaussian buffers. Mirrors the classic `_makeSplat`,\n * including the `* 2` on the scale, which `gpsPreprocess` cancels on the projected covariance.\n * @param splatsData raw `.splat` bytes for this mesh's splats\n */\n private _decode(splatsData: ArrayBuffer): void {\n const bytes = new Uint8Array(splatsData);\n const floats = new Float32Array(splatsData);\n const count = (bytes.length / _BytesPerSplat) | 0;\n const inputs = this._mesh._getPointDecodeInputs();\n const positions = inputs.positions;\n const flipY = inputs.flipY ? -1 : 1;\n const partIndices = this._mesh.isCompound ? inputs.partIndices : null;\n\n let partCount = this._mesh.isCompound ? this._mesh.partCount : 1;\n if (partIndices) {\n for (let i = 0; i < count; i++) {\n if (partIndices[i] + 1 > partCount) {\n partCount = partIndices[i] + 1;\n }\n }\n }\n\n const means = new Float32Array(count * 4);\n const cov3d = new Uint32Array(count * 4);\n const colorOpacity = new Uint32Array(count);\n const sh = this._packSh(this._mesh._shData ?? undefined, this._mesh._shDegree, count);\n\n const quaternion = new Quaternion();\n const rotation = new Matrix();\n const scale = new Matrix();\n const rs = new Matrix();\n const pMin = new Float32Array(partCount * 3).fill(Infinity);\n const pMax = new Float32Array(partCount * 3).fill(-Infinity);\n const activeRanges = inputs.activeRanges;\n const activeMask = activeRanges ? new Uint8Array(count) : null;\n if (activeRanges && activeMask) {\n for (let r = 0; r < activeRanges.length; r += 2) {\n activeMask.fill(1, activeRanges[r], Math.min(count, activeRanges[r] + activeRanges[r + 1]));\n }\n }\n\n for (let i = 0; i < count; i++) {\n const active = !activeMask || activeMask[i] !== 0;\n // Appended parts may use a different Y convention from the mesh's original updateData.\n const mx = positions ? positions[4 * i] : floats[8 * i];\n const my = positions ? positions[4 * i + 1] : floats[8 * i + 1] * flipY;\n const mz = positions ? positions[4 * i + 2] : floats[8 * i + 2];\n\n const qb = _BytesPerSplat * i + 28;\n quaternion.set((bytes[qb + 1] - 127.5) / 127.5, (bytes[qb + 2] - 127.5) / 127.5, (bytes[qb + 3] - 127.5) / 127.5, -(bytes[qb + 0] - 127.5) / 127.5);\n quaternion.normalize();\n quaternion.toRotationMatrix(rotation);\n Matrix.ScalingToRef(floats[8 * i + 3] * 2, floats[8 * i + 4] * 2, floats[8 * i + 5] * 2, scale);\n rotation.multiplyToRef(scale, rs);\n const m = rs.m;\n\n const part = partIndices ? partIndices[i] : 0;\n means[4 * i + 0] = mx;\n means[4 * i + 1] = my;\n means[4 * i + 2] = mz;\n means[4 * i + 3] = part;\n const b = part * 3;\n if (active && mx < pMin[b]) {\n pMin[b] = mx;\n }\n if (active && my < pMin[b + 1]) {\n pMin[b + 1] = my;\n }\n if (active && mz < pMin[b + 2]) {\n pMin[b + 2] = mz;\n }\n if (active && mx > pMax[b]) {\n pMax[b] = mx;\n }\n if (active && my > pMax[b + 1]) {\n pMax[b + 1] = my;\n }\n if (active && mz > pMax[b + 2]) {\n pMax[b + 2] = mz;\n }\n\n // Sigma = (R*S)(R*S)^T, stored as f16 divided by max|component| to keep precision at any scale.\n const s00 = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\n const s01 = m[0] * m[4] + m[1] * m[5] + m[2] * m[6];\n const s02 = m[0] * m[8] + m[1] * m[9] + m[2] * m[10];\n const s11 = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\n const s12 = m[4] * m[8] + m[5] * m[9] + m[6] * m[10];\n const s22 = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\n let factor = Math.max(Math.abs(s00), Math.abs(s01), Math.abs(s02), Math.abs(s11), Math.abs(s12), Math.abs(s22));\n if (!(factor > 0)) {\n factor = 1;\n }\n const inv = 1 / factor;\n cov3d[4 * i + 0] = _Pack2HalfFloat(s00 * inv, s01 * inv);\n cov3d[4 * i + 1] = _Pack2HalfFloat(s02 * inv, s11 * inv);\n cov3d[4 * i + 2] = _Pack2HalfFloat(s12 * inv, s22 * inv);\n _F32Scratch[0] = factor;\n cov3d[4 * i + 3] = _U32Scratch[0];\n\n const cb = _BytesPerSplat * i + 24;\n colorOpacity[i] = bytes[cb] | (bytes[cb + 1] << 8) | (bytes[cb + 2] << 16) | ((active ? bytes[cb + 3] : 0) << 24);\n }\n\n this._splatCount = count;\n this._partCount = partCount;\n this._partLocalMin = pMin;\n this._partLocalMax = pMax;\n if (this._partScratch.length !== partCount * 40) {\n this._partScratch = new Float32Array(partCount * 40);\n }\n this._renderer!.updateSplats(means, cov3d, colorOpacity, sh, this._mesh._shDegree, count);\n }\n\n /**\n * Packs the loader's 8-bit SH bytes into u32 words per splat.\n * @param shData packed per-splat SH textures, one per 16 scalar components, or undefined\n * @param shDegree spherical-harmonics degree (0-4)\n * @param count number of splats\n * @returns u32-packed SH bytes, or null when SH is absent\n */\n private _packSh(shData: Uint8Array[] | undefined, shDegree: number, count: number): Nullable<Uint32Array> {\n if (!shData || shData.length === 0 || shDegree < 1) {\n return null;\n }\n const stride = _GetPackedShBytesPerSplat(shDegree);\n const scalars = (shDegree === 1 ? 3 : shDegree === 2 ? 8 : shDegree === 3 ? 15 : 24) * 3;\n const bytes = new Uint8Array(count * stride);\n for (let i = 0; i < count; i++) {\n const dst = i * stride;\n for (let k = 0; k < scalars; k++) {\n const tex = shData[(k / 16) | 0];\n bytes[dst + k] = tex[i * 16 + (k % 16)];\n }\n }\n return new Uint32Array(bytes.buffer);\n }\n\n /** Uploads this frame's per-part world matrix, visibility and debug-plugin rows. */\n private _uploadParts(): void {\n this._renderer!.debugActive = this._packParts() ? 1 : 0;\n this._renderer!.setPartData(this._partScratch, this._partCount);\n }\n\n /**\n * Packs current part inputs without changing the renderer's accumulation or dispatch buffers.\n * @returns whether the debug plugin is active\n */\n private _packParts(): boolean {\n const count = this._partCount;\n if (this._partScratch.length !== count * 40) {\n this._partScratch = new Float32Array(count * 40);\n }\n const scratch = this._partScratch;\n const compound = this._mesh.isCompound;\n // Runs before the scene evaluates world matrices, so transforms changed this frame must be forced.\n const meshWorld = this._mesh.computeWorldMatrix(true);\n if (compound) {\n this._mesh._syncPartProxyWorldMatrices();\n }\n // The classic material multiplies every splat's opacity by material.alpha.\n const alpha = this._mesh.material?.alpha ?? 1;\n\n const plugin = this._mesh.material?.pluginManager?.getPlugin(\"GaussianSplattingDebug\");\n const pluginType = plugin?.constructor;\n const debugActive = plugin instanceof GaussianSplattingDebugMaterialPlugin && pluginType === GaussianSplattingDebugMaterialPlugin && plugin.isDebugActive;\n let lut: Nullable<Float32Array> = null;\n let lutStride = 0;\n if (plugin && debugActive) {\n const resolved = plugin.getResolvedPartData(count, this._scene.getEngine());\n lut = resolved.data;\n lutStride = resolved.maxPartCount;\n }\n\n for (let i = 0; i < count; i++) {\n const worldM = (compound ? this._mesh.getWorldMatrixForPart(i) : meshWorld).m;\n const vis = compound ? this._mesh.getPartVisibility(i) : this._mesh.visibility;\n const o = i * 40;\n scratch.set(worldM, o);\n scratch[o + 16] = vis * alpha;\n scratch[o + 17] = 0;\n scratch[o + 18] = 0;\n scratch[o + 19] = 0;\n // The LUT is row-major: row r, part i at (stride*r + i)*4.\n if (lut) {\n for (let r = 0; r < 5; r++) {\n const src = (lutStride * r + i) * 4;\n const dst = o + 20 + r * 4;\n scratch[dst] = lut[src];\n scratch[dst + 1] = lut[src + 1];\n scratch[dst + 2] = lut[src + 2];\n scratch[dst + 3] = lut[src + 3];\n }\n } else {\n scratch[o + 20] = -1e9;\n scratch[o + 21] = -1e9;\n scratch[o + 22] = -1e9;\n scratch[o + 23] = 1e9;\n scratch[o + 24] = 1e9;\n scratch[o + 25] = 1e9;\n scratch[o + 26] = 0;\n scratch[o + 27] = 1;\n scratch[o + 28] = 0;\n scratch[o + 29] = 1e9;\n scratch[o + 30] = 1;\n scratch[o + 31] = 0;\n scratch[o + 32] = 1;\n scratch[o + 33] = 1;\n scratch[o + 34] = 1;\n scratch[o + 35] = 1;\n scratch[o + 36] = 1;\n scratch[o + 37] = 0;\n scratch[o + 38] = 0;\n scratch[o + 39] = 0;\n }\n }\n return debugActive;\n }\n\n /**\n * Protects point-color history from pass-specific inputs while allowing shared camera motion.\n * @returns whether depth can share the current color inputs without a pass-specific accumulation reset\n */\n private _depthInputsMatchColorHistory(): boolean {\n const renderer = this._renderer;\n if (!this._colorHistoryReady || !renderer) {\n return true;\n }\n const material = this._mesh.material as GaussianSplattingMaterial;\n // Camera motion advances both passes; only custom color matrices must match the retained frame.\n const colorTransform = this._colorUsesCameraTransform ? this._getCameraTransform() : this._vpMatrix;\n if (\n this._decodedSplatsData !== this._mesh._splatsData ||\n this._decodedRevision !== this._mesh._splatDataRevision ||\n this._decodedShDegree !== this._mesh._shDegree ||\n !colorTransform?.equalsWithEpsilon(this._scene.getTransformMatrix(), 1e-5) ||\n renderer.kernelSize !== (material.kernelSize || GaussianSplattingMaterial.KernelSize) ||\n renderer.minPixelSize !== material.minPixelSize ||\n renderer.compensation !== material.compensation\n ) {\n return false;\n }\n const debugActive = this._packParts() ? 1 : 0;\n return renderer.debugActive === debugActive && renderer._matchesPartData(this._partScratch, this._partCount);\n }\n\n /**\n * Uses the scene's main camera matrix before render targets can refresh the camera's projection cache.\n * @returns the current camera transform, or null if a different camera owns the render target\n */\n private _getCameraTransform(): Nullable<Matrix> {\n if (this._cameraFrameId === this._scene.getFrameId()) {\n return this._cameraId === this._scene.activeCamera?.uniqueId ? this._cameraVpMatrix : null;\n }\n return this._scene.activeCamera?.getTransformationMatrix() ?? null;\n }\n\n /**\n * Reads the forward clipping interval of a projection whose depth is independent of x/y.\n * @param projection the supplied projection matrix\n * @returns the reused near/far interval (zero far means infinite), or null for unsupported intervals\n */\n private _getProjectionClipRange(projection: Matrix): Nullable<Float64Array> {\n const engine = this._scene.getEngine();\n const m = projection.m;\n const nearDepth = engine.useReverseDepthBuffer ? 1 : engine.isNDCHalfZRange ? 0 : -1;\n const farDepth = engine.useReverseDepthBuffer ? (engine.isNDCHalfZRange ? 0 : -1) : 1;\n const sign = this._scene.useRightHandedSystem ? -1 : 1;\n const near = (sign * (m[14] - nearDepth * m[15])) / (nearDepth * m[11] - m[10]);\n const farDenominator = farDepth * m[11] - m[10];\n const far = farDenominator === 0 ? Infinity : (sign * (m[14] - farDepth * m[15])) / farDenominator;\n if (!Number.isFinite(near) || !(far > near) || !(far > 0)) {\n return null;\n }\n this._projectionClipRange[0] = near;\n this._projectionClipRange[1] = far === Infinity ? 0 : far;\n return this._projectionClipRange;\n }\n\n /**\n * Computes the model's view-depth span from its part AABB corners.\n * @param viewM column-major view matrix\n * @param near camera near plane\n * @param far camera far plane; 0 means infinite\n * @param clampToCamera whether to clamp the interval to the standard camera near/far planes\n * @returns the model's [viewZMin, viewZMax] this frame\n */\n private _viewZSpan(viewM: ArrayLike<number>, near: number, far: number, clampToCamera = true): [number, number] {\n let vzMin = Infinity;\n let vzMax = -Infinity;\n const scratch = this._partScratch;\n for (let p = 0; p < this._partCount; p++) {\n const wb = p * 40;\n const lb = p * 3;\n const minx = this._partLocalMin[lb];\n if (!isFinite(minx)) {\n continue;\n }\n const miny = this._partLocalMin[lb + 1];\n const minz = this._partLocalMin[lb + 2];\n const maxx = this._partLocalMax[lb];\n const maxy = this._partLocalMax[lb + 1];\n const maxz = this._partLocalMax[lb + 2];\n for (let c = 0; c < 8; c++) {\n const lx = c & 1 ? maxx : minx;\n const ly = c & 2 ? maxy : miny;\n const lz = c & 4 ? maxz : minz;\n const wx = scratch[wb + 0] * lx + scratch[wb + 4] * ly + scratch[wb + 8] * lz + scratch[wb + 12];\n const wy = scratch[wb + 1] * lx + scratch[wb + 5] * ly + scratch[wb + 9] * lz + scratch[wb + 13];\n const wz = scratch[wb + 2] * lx + scratch[wb + 6] * ly + scratch[wb + 10] * lz + scratch[wb + 14];\n // View-space forward depth is positive for both handedness conventions.\n const viewZ = viewM[2] * wx + viewM[6] * wy + viewM[10] * wz + viewM[14];\n const vz = this._scene.useRightHandedSystem ? -viewZ : viewZ;\n if (vz < vzMin) {\n vzMin = vz;\n }\n if (vz > vzMax) {\n vzMax = vz;\n }\n }\n }\n const minClip = clampToCamera ? near : -Infinity;\n const maxClip = clampToCamera && far > 0 ? far : Infinity;\n vzMin = Math.max(minClip, vzMin);\n vzMax = Math.min(maxClip, vzMax);\n if (!isFinite(vzMin) || vzMax < vzMin) {\n // Nothing visible; any finite span works.\n this._depthSpan[0] = near;\n this._depthSpan[1] = far > near ? far : near + 1;\n } else if (vzMax === vzMin) {\n // Flat or single-splat model: widen a band around the actual depth. Collapsing to [near, ...]\n // instead would place the surface at the near plane and break the depth test and depth map.\n const epsilon = Math.max(Math.abs(vzMin) * 1e-3, 1e-4);\n this._depthSpan[0] = Math.max(minClip, vzMin - epsilon);\n this._depthSpan[1] = vzMax + epsilon;\n } else {\n this._depthSpan[0] = vzMin;\n this._depthSpan[1] = vzMax;\n }\n return this._depthSpan;\n }\n\n /**\n * Returns a stride coprime to `total` near the golden ratio, so `i*stride % total` is a decorrelated permutation.\n * @param total the cycle length (number of sub-cells, N*N)\n * @returns a stride coprime to total\n */\n private _coprimeStride(total: number): number {\n if (total <= 2) {\n return 1;\n }\n let s = Math.max(1, Math.round(total * 0.6180339887));\n let a = s;\n let b = total;\n while (b !== 0) {\n const remainder = a % b;\n a = b;\n b = remainder;\n }\n while (a !== 1) {\n s++;\n a = s;\n b = total;\n while (b !== 0) {\n const remainder = a % b;\n a = b;\n b = remainder;\n }\n }\n return s;\n }\n\n /** Per-frame point target for the `\"auto\"` render scale: desktop 15M, iOS 9M, other mobile 6M.\n * @returns the target emitted-point count per frame */\n private _budget(): number {\n const isMobile = !!this._scene.getEngine().hostInformation?.isMobile;\n if (!isMobile) {\n return 15_000_000;\n }\n if (typeof navigator !== \"undefined\" && navigator.userAgent && /iPad|iPhone|iPod/.test(navigator.userAgent)) {\n return 9_000_000;\n }\n return 6_000_000;\n }\n\n /**\n * Reads back the point count and derives the auto render factor N from the device budget.\n * @param currentN the render factor N used for the frame being measured\n * @param generation the accumulation generation the measured frame belongs to\n * @param freeze whether the measured frame had occlusion culling active, so N may be fixed for `generation`\n */\n private _updateAutoScale(currentN: number, generation: number, freeze: boolean): void {\n if (this._budgetReadPending || !this._renderer) {\n return;\n }\n this._budgetReadPending = true;\n void this._convergeAutoScaleAsync(currentN, generation, freeze, this._autoRequestId);\n }\n\n private async _convergeAutoScaleAsync(currentN: number, generation: number, freeze: boolean, requestId: number): Promise<void> {\n const renderer = this._renderer;\n if (!renderer) {\n return;\n }\n try {\n const total = await renderer.readPointCountAsync();\n if (renderer !== this._renderer || !this._computeActive || requestId !== this._autoRequestId || this._renderScale !== \"auto\") {\n return;\n }\n if (total > 0) {\n // Points scale as N^-2.\n const fullPoints = total * currentN * currentN;\n const target = Math.max(1, Math.min(8, Math.ceil(Math.sqrt(fullPoints / this._budget()))));\n // Evaluated before the reset below, which would make every sample look stale.\n const stale = !freeze || renderer.accumulationVersion !== generation;\n const factorChanged = target !== this._autoN;\n this._autoN = target;\n if (factorChanged) {\n // N must not change within a generation.\n renderer.resetAccumulation();\n }\n if (stale) {\n return;\n }\n // Re-measuring would reproduce this estimate, so at most one corrective reset happens.\n this._autoMeasuredGeneration = renderer.accumulationVersion;\n }\n } catch (error) {\n if (renderer === this._renderer && this._computeActive) {\n Logger.Error(`GaussianSplattingMesh: point-splatting budget readback failed: ${String(error)}`);\n }\n } finally {\n if (renderer === this._renderer) {\n this._budgetReadPending = false;\n }\n }\n }\n\n /** Returns the current depth map's size, or the camera's color target size for other passes.\n * The returned object is reused between calls.\n * @param colorTarget whether to return color dimensions regardless of the current pass\n * @returns The current target dimensions in pixels.\n */\n private _getOutputSize(colorTarget = false): { width: number; height: number } {\n const engine = this._scene.getEngine();\n const camera = this._scene.activeCamera;\n const postProcess = this._scene.postProcessesEnabled ? camera?._getFirstPostProcess() : null;\n const outputRenderTarget = camera?.outputRenderTarget;\n let width: number;\n let height: number;\n const depthMap = this._depthMode && !colorTarget ? this._getCurrentDepthRenderer()?.getDepthMap() : null;\n if (depthMap) {\n width = depthMap.getRenderWidth();\n height = depthMap.getRenderHeight();\n } else if (postProcess && postProcess.width > 0 && postProcess.height > 0) {\n width = postProcess.width;\n height = postProcess.height;\n } else if (outputRenderTarget) {\n width = outputRenderTarget.getRenderWidth();\n height = outputRenderTarget.getRenderHeight();\n } else {\n width = engine.getRenderWidth(true);\n height = engine.getRenderHeight(true);\n }\n this._outputSize.width = Math.max(1, width);\n this._outputSize.height = Math.max(1, height);\n return this._outputSize;\n }\n\n /** Refreshes inputs baked into the point result, including changes made by per-pass mesh callbacks. */\n private _syncRenderInputs(): void {\n this._syncData();\n if (this._splatCount === 0) {\n return;\n }\n const material = this._mesh.material as Nullable<GaussianSplattingMaterial>;\n const kernelSize = material?.kernelSize || GaussianSplattingMaterial.KernelSize;\n const minPixelSize = material ? material.minPixelSize : GaussianSplattingMaterial.MinPixelSize;\n const compensation = material?.compensation ?? GaussianSplattingMaterial.Compensation;\n const renderer = this._renderer!;\n if (renderer.kernelSize !== kernelSize || renderer.minPixelSize !== minPixelSize || renderer.compensation !== compensation) {\n renderer.kernelSize = kernelSize;\n renderer.minPixelSize = minPixelSize;\n renderer.compensation = compensation;\n renderer.resetAccumulation();\n }\n this._uploadParts();\n }\n\n /** Runs compute immediately before a point compositor and binds the result to both blit materials. */\n private _runCompute(): void {\n this._resultReady = false;\n this._progressReady = false;\n if ((this._colorMode || this._depthMode) && this._mesh._pointStreamingUnsupported && !this._streamingWarned) {\n this._streamingWarned = true;\n Logger.Warn(\n \"GaussianSplattingMesh: point splatting does not support streamed parts (their splats are GPU-decoded and never reach the retained CPU splat data); falling back to the classic renderer.\"\n );\n }\n if ((this._colorMode || this._depthMode) && this._hasUnsupportedSource && !this._sourceWarned) {\n this._sourceWarned = true;\n Logger.Warn(\"GaussianSplattingMesh: point splatting requires retained CPU splat data; GPU-only SOG textures and streams use the classic renderer.\");\n }\n if (!this._computeActive || !this._mesh.isEnabled() || !this._renderer || !_DependenciesReady || this._hasUnsupportedView()) {\n return;\n }\n if (!this._isWorkloadSupported()) {\n return;\n }\n this._syncRenderInputs();\n if (this._splatCount === 0) {\n return;\n }\n const camera = this._scene.activeCamera!;\n const engine = this._scene.getEngine();\n // Render at 1/N resolution and reconstruct full resolution over N^2 jittered frames.\n const { width: fullW, height: fullH } = this._getOutputSize();\n const scaleOpt = this._renderScale;\n const upsampleN = scaleOpt === \"auto\" ? this._autoN : Math.max(1, Math.min(8, Math.round(1 / Math.max(scaleOpt, 1e-3))));\n const width = Math.max(1, Math.ceil(fullW / upsampleN));\n const height = Math.max(1, Math.ceil(fullH / upsampleN));\n // Driven by the renderer's frame count, which also seeds sampling, so skipped frames cannot desync them.\n const total = upsampleN * upsampleN;\n const j = ((this._renderer.renderedFrameCount % total) * this._coprimeStride(total)) % total;\n const jitterX = j % upsampleN;\n const jitterY = Math.floor(j / upsampleN);\n\n const view = this._scene.getViewMatrix();\n const projection = this._scene.getProjectionMatrix();\n const determinant = projection.determinant();\n if (!Number.isFinite(determinant) || determinant === 0) {\n if (!this._invalidProjectionWarned) {\n this._invalidProjectionWarned = true;\n Logger.Error(\"GaussianSplattingMesh: the camera projection matrix is not finite and invertible; point splatting skips the mesh.\");\n }\n return;\n }\n this._invalidProjectionWarned = false;\n projection.invertToRef(this._inverseProjection);\n this._vpMatrix.copyFrom(this._scene.getTransformMatrix());\n const focalX = (fullW * projection.m[0]) / (2 * upsampleN);\n const focalY = (fullH * projection.m[5]) / (2 * upsampleN);\n const camPos = camera.globalPosition;\n this._renderer.rightHandedSystem = this._scene.useRightHandedSystem;\n this._renderer.isOrthographic = Math.abs(projection.m[15] - 1) < 0.001;\n const gsMaterial = this._mesh.material as Nullable<GaussianSplattingMaterial>;\n\n const projectedDepth = _HasGaussianPointSplattingProjectedDepth(projection);\n const clipRange = projectedDepth ? null : this._getProjectionClipRange(projection);\n const nearZ = clipRange?.[0] ?? camera.minZ;\n const farZ = clipRange?.[1] ?? (camera.ignoreCameraMaxZ ? 0 : camera.maxZ);\n const [vzMin, vzMax] = this._viewZSpan(view.m, nearZ, farZ, !projectedDepth);\n this._renderer.setCamera(view, this._vpMatrix, nearZ, farZ, focalX, focalY, camPos.x, camPos.y, camPos.z, vzMin, vzMax);\n this._renderer.setProjectionMatrix(projection, this._inverseProjection, engine.useReverseDepthBuffer);\n if (!this._renderer.renderToBuffer(width, height, fullW, fullH, upsampleN, jitterX, jitterY)) {\n return;\n }\n this._resultReady = true;\n this._progressReady = true;\n this._computedWidth = fullW;\n this._computedHeight = fullH;\n // Snapshot now: a later reset would pair a new generation with the old cycle length.\n this._progressFrameCount = this._renderer.renderedFrameCount;\n this._progressGeneration = this._renderer.accumulationVersion;\n this._progressCycleLength = this._renderer.pixelCycleLength;\n\n const generation = this._renderer.accumulationVersion;\n const wasMoving = generation !== this._lastRenderedGeneration;\n this._lastRenderedGeneration = generation;\n if (scaleOpt === \"auto\" && this._autoMeasuredGeneration !== generation) {\n this._updateAutoScale(upsampleN, generation, !wasMoving);\n }\n\n const accum = this._renderer.accumBuffer;\n const accumDepth = this._renderer.accumDepthBuffer;\n if (accum && accumDepth) {\n if (this._colorMode && this._blit) {\n this._blit.setAccumBuffer(accum);\n this._blit.setAccumDepthBuffer(accumDepth);\n this._blit.setResolution(this._renderer.outputWidth, this._renderer.outputHeight);\n this._blit.setInverseProjection(this._inverseProjection);\n // Match the classic material's log depth so the composite depth-tests like the classic path.\n this._blit.setLogarithmicDepthConstant(gsMaterial?.useLogarithmicDepth ? 2.0 / (Math.log(camera.maxZ + 1.0) / Math.LN2) : 0);\n }\n if (this._depthMode && this._depthBlit) {\n this._depthBlit.setAccumBuffer(accum);\n this._depthBlit.setAccumDepthBuffer(accumDepth);\n this._depthBlit.setResolution(this._renderer.outputWidth, this._renderer.outputHeight);\n this._depthBlit.setInverseProjection(this._inverseProjection);\n // Same normalization as GaussianSplattingMaterial._BindEffectUniforms.\n let minZ: number, maxZ: number;\n if (camera.mode === Constants.ORTHOGRAPHIC_CAMERA) {\n minZ = !engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : 1;\n maxZ = engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : 1;\n } else {\n minZ = engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? camera.minZ : engine.isNDCHalfZRange ? 0 : camera.minZ;\n maxZ = engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : camera.maxZ;\n }\n this._depthBlit.setDepthValues(minZ, minZ + maxZ);\n this._depthBlit.setReverseDepth(engine.useReverseDepthBuffer);\n }\n }\n }\n\n /**\n * True when the frame renders a view the point path cannot reproduce: several active cameras, rig\n * cameras (stereo, XR, multiview), floating origin, unsupported projection clipping intervals, or scene/material clip planes.\n * The classic path renders those instead.\n * @returns whether point splatting must fall back to the classic path this frame\n */\n private _hasUnsupportedView(): boolean {\n const scene = this._scene;\n const camera = scene.activeCamera;\n if (!camera || scene.floatingOriginMode) {\n return true;\n }\n const projection = camera.getProjectionMatrix();\n if (!_HasGaussianPointSplattingProjectedDepth(projection) && !this._getProjectionClipRange(projection)) {\n return true;\n }\n const material = this._mesh.material;\n return (\n (scene.activeCameras?.length ?? 0) > 1 ||\n camera._rigCameras.length > 0 ||\n !!(material?.clipPlane || material?.clipPlane2 || material?.clipPlane3 || material?.clipPlane4 || material?.clipPlane5 || material?.clipPlane6) ||\n !!(scene.clipPlane || scene.clipPlane2 || scene.clipPlane3 || scene.clipPlane4 || scene.clipPlane5 || scene.clipPlane6)\n );\n }\n\n /**\n * True only for the camera's main forward color pass.\n * @returns whether the current render pass is the camera's main forward color pass\n */\n private _isMainColorPass(): boolean {\n const engine = this._scene.getEngine();\n const cam = this._scene.activeCamera;\n const mainId = cam?.outputRenderTarget?.renderPassId ?? cam?.renderPassId ?? Constants.RENDERPASS_MAIN;\n return engine.currentRenderPassId === mainId && !this._mesh.getMaterialForRenderPass(engine.currentRenderPassId);\n }\n\n /**\n * The active camera's scene depth renderer while it is rendering; other depth passes use the classic path.\n * @returns the depth renderer owning the current render pass, or null\n */\n private _getCurrentDepthRenderer(): Nullable<DepthRenderer> {\n const depthRenderers = this._scene._depthRenderer;\n const camera = this._scene.activeCamera;\n if (!depthRenderers || !camera) {\n return null;\n }\n const renderer = depthRenderers[camera.uniqueId];\n if (!renderer || !renderer.enabled) {\n return null;\n }\n return renderer.getDepthMap().renderPassIds.indexOf(this._scene.getEngine().currentRenderPassId) !== -1 ? renderer : null;\n }\n\n /**\n * True only while rendering the active camera's scene depth renderer.\n * @returns whether the current render pass is the active camera's depth renderer pass\n */\n private _isDepthPass(): boolean {\n return !!this._getCurrentDepthRenderer();\n }\n\n /** {@inheritDoc IGaussianPointSplattingController.dispose} */\n public dispose(): void {\n if (this._computeObserver) {\n this._scene.onBeforeRenderObservable.remove(this._computeObserver);\n this._computeObserver = null;\n }\n if (this._cameraObserver) {\n this._scene.onBeforeCameraRenderObservable.remove(this._cameraObserver);\n this._cameraObserver = null;\n }\n if (this._restoreObserver) {\n this._scene.getEngine().onContextRestoredObservable.remove(this._restoreObserver);\n this._restoreObserver = null;\n }\n this._releaseComputeResources();\n this._releaseBlitResources();\n this._colorMode = false;\n this._depthMode = false;\n }\n /** {@inheritDoc IGaussianPointSplattingController.renderScale} */\n public get renderScale(): number | \"auto\" {\n return this._renderScale;\n }\n\n public set renderScale(value: number | \"auto\") {\n if (value === this._renderScale) {\n return;\n }\n this._renderScale = value;\n this._autoRequestId++;\n this._autoMeasuredGeneration = -1;\n this._renderer?.resetAccumulation();\n }\n\n /** {@inheritDoc IGaussianPointSplattingController.invalidateDecodedSplats} */\n public invalidateDecodedSplats(): void {\n this._decodedSplatsData = null;\n this._renderer?.resetAccumulation();\n }\n\n /**\n * Checks only plugin implementations whose enabled behavior is reproduced, or whose disabled behavior is neutral.\n * @returns whether the source material's plugins are compatible with point color\n */\n private _supportsSourceMaterialPlugins(): boolean {\n const plugins = this._mesh.material?.pluginManager?._plugins;\n if (!plugins) {\n return true;\n }\n for (const plugin of plugins) {\n const pluginType = plugin.constructor;\n if (\n (pluginType === GaussianSplattingDebugMaterialPlugin && plugin instanceof GaussianSplattingDebugMaterialPlugin) ||\n (pluginType === GaussianSplattingSolidColorMaterialPlugin && plugin instanceof GaussianSplattingSolidColorMaterialPlugin && !plugin.isEnabled) ||\n (pluginType === GaussianSplattingSizeMaterialPlugin && plugin instanceof GaussianSplattingSizeMaterialPlugin && !plugin.isEnabled) ||\n (pluginType === GaussianSplattingOverdrawMaterialPlugin && plugin instanceof GaussianSplattingOverdrawMaterialPlugin && !plugin.isEnabled)\n ) {\n continue;\n }\n return false;\n }\n return true;\n }\n\n /** {@inheritDoc IGaussianPointSplattingController.handlesCurrentPass} */\n public get handlesCurrentPass(): boolean {\n const passMaterial = this._mesh.getMaterialForRenderPass(this._scene.getEngine().currentRenderPassId);\n const depthRenderer = this._depthMode ? this._getCurrentDepthRenderer() : null;\n const viewport = this._scene.activeCamera?.viewport;\n const fullViewport = !!viewport && viewport.x === 0 && viewport.y === 0 && viewport.width === 1 && viewport.height === 1;\n let depthPass = !!depthRenderer && (fullViewport || depthRenderer.getDepthMap().ignoreCameraViewport) && !this._scene.forceWireframe && !this._scene.forcePointsCloud;\n // The depth renderer always installs its own classic GS depth material for its pass; only a\n // user override set through setMaterialForRendering keeps the classic path.\n if (passMaterial && !depthRenderer?._isGaussianSplattingDepthMaterial(passMaterial)) {\n return false;\n }\n const fog = this._scene.fogEnabled && this._scene.fogMode !== Scene.FOGMODE_NONE && this._mesh.applyFog && !!this._mesh.material?.fogEnabled;\n const colorSupported =\n this._colorMode &&\n fullViewport &&\n this._mesh.material?.alphaMode === Constants.ALPHA_COMBINE &&\n this._mesh.material.needAlphaBlendingForMesh(this._mesh) &&\n !this._mesh.material.needAlphaTestingForMesh(this._mesh) &&\n this._mesh._getRenderingFillMode(this._mesh.material.fillMode) === Material.TriangleFillMode &&\n // Custom source shaders, including subclass overrides and NodeMaterial graphs, are not evaluated by compute.\n this._mesh.material.constructor === GaussianSplattingMaterial &&\n this._supportsSourceMaterialPlugins() &&\n !fog;\n if (depthPass && depthRenderer && colorSupported) {\n const depthMap = depthRenderer.getDepthMap();\n const colorSize = this._getOutputSize(true);\n // One renderer cannot retain accumulation while alternating incompatible pixel grids.\n depthPass = depthMap.getRenderWidth() === colorSize.width && depthMap.getRenderHeight() === colorSize.height && this._depthInputsMatchColorHistory();\n }\n const colorPass = colorSupported && this._isMainColorPass();\n return (colorPass || depthPass) && this._computeActive && !this._hasUnsupportedView() && (!this._renderer || this._isWorkloadSupported());\n }\n\n /**\n * Composites supported camera color or depth passes from the point-splatting result.\n * The pass waits without drawing classic splats while compute or compositor shaders are compiling.\n * @param enableAlphaMode whether the color compositor should enable alpha blending\n * @returns whether the point path handled the current pass, including waiting for shader readiness\n */\n public drawColorPass(enableAlphaMode: boolean): boolean {\n if (!this.handlesCurrentPass) {\n if (!this._computeActive) {\n this._runCompute();\n }\n return false;\n }\n const colorPass = this._colorMode && this._isMainColorPass();\n const depthPass = this._depthMode && this._isDepthPass();\n const { width, height } = this._getOutputSize();\n if (this._resultReady && this._renderer) {\n this._syncRenderInputs();\n if (this._renderer.accumulationVersion !== this._progressGeneration) {\n this._resultReady = false;\n }\n }\n // Compute only after the pass has established its actual matrices. Matching color/depth passes share it.\n if (!this._resultReady || !this._vpMatrix.equalsWithEpsilon(this._scene.getTransformMatrix(), 1e-5) || this._computedWidth !== width || this._computedHeight !== height) {\n this._runCompute();\n }\n if (!this._resultReady) {\n return true;\n }\n if (colorPass) {\n this._colorHistoryReady = true;\n this._colorUsesCameraTransform = this._getCameraTransform()?.equalsWithEpsilon(this._vpMatrix, 1e-5) ?? false;\n }\n if (colorPass && this._blitMesh && this._blitMesh.subMeshes.length > 0 && this._blit?.isReady(this._blitMesh, false, this._blitMesh.subMeshes[0])) {\n const blitMesh = this._blitMesh;\n const material = this._mesh.material;\n if (material) {\n this._blit.disableColorWrite = material.disableColorWrite;\n this._blit.disableDepthWrite = material.disableDepthWrite;\n this._blit.forceDepthWrite = material.forceDepthWrite;\n this._blit.depthFunction = material.depthFunction;\n this._blit.zOffset = material.zOffset;\n this._blit.zOffsetUnits = material.zOffsetUnits;\n // Copy directly to avoid SerializationHelper allocations in each color draw.\n const source = material.stencil;\n const stencil = this._blit.stencil;\n stencil.enabled = source.enabled;\n stencil.mask = source.mask;\n stencil.func = source.func;\n stencil.funcRef = source.funcRef;\n stencil.funcMask = source.funcMask;\n stencil.opStencilFail = source.opStencilFail;\n stencil.opDepthFail = source.opDepthFail;\n stencil.opStencilDepthPass = source.opStencilDepthPass;\n stencil.backFunc = source.backFunc;\n stencil.backOpStencilFail = source.backOpStencilFail;\n stencil.backOpDepthFail = source.backOpDepthFail;\n stencil.backOpStencilDepthPass = source.backOpStencilDepthPass;\n }\n // Render in replacement mode so the disabled compositor still draws itself.\n blitMesh.render(blitMesh.subMeshes[0], enableAlphaMode, blitMesh);\n return true;\n }\n if (depthPass && this._depthBlitMesh) {\n const depthBlitMesh = this._depthBlitMesh;\n if (depthBlitMesh.subMeshes.length > 0 && this._depthBlit?.isReady(depthBlitMesh, false, depthBlitMesh.subMeshes[0])) {\n // The depth renderer may have left alpha blending on.\n this._scene.getEngine().setAlphaMode(Constants.ALPHA_DISABLE);\n depthBlitMesh.render(depthBlitMesh.subMeshes[0], false, depthBlitMesh);\n return true;\n }\n }\n return true;\n }\n}\n\nlet _Registered = false;\n\n/**\n * Enables the point-splatting properties of {@link GaussianSplattingMesh}. Idempotent.\n */\nexport function RegisterGaussianPointSplattingController(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n _SetGaussianPointSplattingControllerFactory((mesh) => new GaussianPointSplattingController(mesh));\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports the pure implementation and imports required shaders/features for their runtime registration.
|
|
3
|
+
* Import gaussianPointSplattingRenderer.pure for tree-shakeable, side-effect-free usage.
|
|
4
|
+
*/
|
|
5
|
+
export * from "./gaussianPointSplattingRenderer.pure.js";
|
|
6
|
+
import "../../Engines/WebGPU/Extensions/engine.computeShader.js";
|
|
7
|
+
import "../../ShadersWGSL/gpsPreprocess.compute.js";
|
|
8
|
+
import "../../ShadersWGSL/gpsScanBlocks.compute.js";
|
|
9
|
+
import "../../ShadersWGSL/gpsScanSums.compute.js";
|
|
10
|
+
import "../../ShadersWGSL/gpsScanAdd.compute.js";
|
|
11
|
+
import "../../ShadersWGSL/gpsPartition.compute.js";
|
|
12
|
+
import "../../ShadersWGSL/gpsSplat.compute.js";
|
|
13
|
+
import "../../ShadersWGSL/gpsResolve.compute.js";
|
|
14
|
+
import "../../ShadersWGSL/gpsHiZBuild.compute.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports the pure implementation and imports required shaders/features for their runtime registration.
|
|
3
|
+
* Import gaussianPointSplattingRenderer.pure for tree-shakeable, side-effect-free usage.
|
|
4
|
+
*/
|
|
5
|
+
export * from "./gaussianPointSplattingRenderer.pure.js";
|
|
6
|
+
import "../../Engines/WebGPU/Extensions/engine.computeShader.js";
|
|
7
|
+
import "../../ShadersWGSL/gpsPreprocess.compute.js";
|
|
8
|
+
import "../../ShadersWGSL/gpsScanBlocks.compute.js";
|
|
9
|
+
import "../../ShadersWGSL/gpsScanSums.compute.js";
|
|
10
|
+
import "../../ShadersWGSL/gpsScanAdd.compute.js";
|
|
11
|
+
import "../../ShadersWGSL/gpsPartition.compute.js";
|
|
12
|
+
import "../../ShadersWGSL/gpsSplat.compute.js";
|
|
13
|
+
import "../../ShadersWGSL/gpsResolve.compute.js";
|
|
14
|
+
import "../../ShadersWGSL/gpsHiZBuild.compute.js";
|
|
15
|
+
//# sourceMappingURL=gaussianPointSplattingRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gaussianPointSplattingRenderer.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,uCAAuC,CAAC;AAEtD,OAAO,sDAAsD,CAAC;AAC9D,OAAO,yCAAyC,CAAC;AACjD,OAAO,yCAAyC,CAAC;AACjD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,uCAAuC,CAAC","sourcesContent":["/**\n * Re-exports the pure implementation and imports required shaders/features for their runtime registration.\n * Import gaussianPointSplattingRenderer.pure for tree-shakeable, side-effect-free usage.\n */\nexport * from \"./gaussianPointSplattingRenderer.pure\";\n\nimport \"../../Engines/WebGPU/Extensions/engine.computeShader\";\nimport \"../../ShadersWGSL/gpsPreprocess.compute\";\nimport \"../../ShadersWGSL/gpsScanBlocks.compute\";\nimport \"../../ShadersWGSL/gpsScanSums.compute\";\nimport \"../../ShadersWGSL/gpsScanAdd.compute\";\nimport \"../../ShadersWGSL/gpsPartition.compute\";\nimport \"../../ShadersWGSL/gpsSplat.compute\";\nimport \"../../ShadersWGSL/gpsResolve.compute\";\nimport \"../../ShadersWGSL/gpsHiZBuild.compute\";\n"]}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
/** This file must only contain pure code and pure imports */
|
|
2
|
+
import { type Nullable } from "../../types.js";
|
|
3
|
+
import { type AbstractEngine } from "../../Engines/abstractEngine.pure.js";
|
|
4
|
+
import { type Matrix } from "../../Maths/math.vector.pure.js";
|
|
5
|
+
import { StorageBuffer } from "../../Buffers/storageBuffer.js";
|
|
6
|
+
/**
|
|
7
|
+
* Whether projected depth depends on view-space x/y.
|
|
8
|
+
* @param projection the camera projection
|
|
9
|
+
* @returns whether depth must be evaluated separately at each sampled pixel
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function _HasGaussianPointSplattingProjectedDepth(projection: Matrix): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Bytes per Gaussian of the u32-packed 8-bit SH coefficients for an SH degree.
|
|
15
|
+
* @param shDegree spherical-harmonics degree (0-4)
|
|
16
|
+
* @returns packed SH bytes per Gaussian (0 at degree 0)
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function _GetPackedShBytesPerSplat(shDegree: number): number;
|
|
20
|
+
/**
|
|
21
|
+
* Owns the WebGPU compute pipeline and GPU buffers for Gaussian Point Splatting (the stochastic,
|
|
22
|
+
* sort-free point-splatting technique). Engine-focused: it knows nothing about the scene graph
|
|
23
|
+
* beyond the camera matrices and viewport size handed to it.
|
|
24
|
+
*
|
|
25
|
+
* Per-frame pipeline (dispatched before the render pass):
|
|
26
|
+
* preprocess (1 thread/Gaussian: transform, cull, cache screen state, emit a point weight)
|
|
27
|
+
* scan (Blelloch prefix sum of the weights into a CDF + GPU-written indirect dispatch args)
|
|
28
|
+
* partition (bucketed point-to-Gaussian table that narrows the splat search)
|
|
29
|
+
* splat (indirect, 1 thread/point: find its Gaussian in the CDF, atomicMin its sample)
|
|
30
|
+
* resolve (accumulate the packed image buffer into the full-float buffer, reset it)
|
|
31
|
+
* hi-Z build (max-reduce this frame's depth into next frame's occlusion pyramid)
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare class GaussianPointSplattingRenderer {
|
|
35
|
+
private readonly _engine;
|
|
36
|
+
private _preprocessCs;
|
|
37
|
+
private _preprocessBindings;
|
|
38
|
+
private _preprocessShDegree;
|
|
39
|
+
private _scanBlocksCs;
|
|
40
|
+
private _scanSumsCs;
|
|
41
|
+
private _scanAddCs;
|
|
42
|
+
private _partitionCs;
|
|
43
|
+
private _hiZBuildCs;
|
|
44
|
+
private _splatCs;
|
|
45
|
+
private _resolveCs;
|
|
46
|
+
private _uniforms;
|
|
47
|
+
private _resolveParams;
|
|
48
|
+
private _means;
|
|
49
|
+
private _colorOpacity;
|
|
50
|
+
private _cov3d;
|
|
51
|
+
private _sh;
|
|
52
|
+
private _shDegree;
|
|
53
|
+
private _weights;
|
|
54
|
+
private _gsData;
|
|
55
|
+
private _cdf;
|
|
56
|
+
private _blockSums;
|
|
57
|
+
private _gaussianCount;
|
|
58
|
+
private _numBlocks;
|
|
59
|
+
/** Sample-density multiplier on the (importance-calibrated) point count. Keep at 1 for exact
|
|
60
|
+
* coverage = opacity*gaussian; other values trade noise for cost but bias the alpha. */
|
|
61
|
+
pointScale: number;
|
|
62
|
+
/** Low-pass antialiasing dilation, in the classic material's `kernelSize` units. */
|
|
63
|
+
kernelSize: number;
|
|
64
|
+
/** Classic material's `minPixelSize`: splats whose projected diameter is below this many output pixels are skipped (0 = off). */
|
|
65
|
+
minPixelSize: number;
|
|
66
|
+
/** Whether view-space forward is negative (right-handed scenes). */
|
|
67
|
+
rightHandedSystem: boolean;
|
|
68
|
+
/** 1 when any per-part debug knob is active (drives the preprocess debug branch); 0 otherwise. */
|
|
69
|
+
debugActive: number;
|
|
70
|
+
/** Whether the active camera is orthographic (selects the ortho Jacobian in computeCov2D). */
|
|
71
|
+
isOrthographic: boolean;
|
|
72
|
+
/** Whether the source material enables antialiasing opacity compensation (classic COMPENSATION). */
|
|
73
|
+
compensation: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Hi-Z occlusion culling: skip Gaussians fully behind the previous frame's nearest samples. Off by default
|
|
76
|
+
* because those stochastic samples may be semi-transparent, so culling biases the converged image.
|
|
77
|
+
* The depth pyramid is allocated only while enabled.
|
|
78
|
+
*/
|
|
79
|
+
occlusionCulling: boolean;
|
|
80
|
+
private _pointCount;
|
|
81
|
+
private _indirectArgs;
|
|
82
|
+
private _partition;
|
|
83
|
+
private _imageBuffer;
|
|
84
|
+
private _accumBuffer;
|
|
85
|
+
private _accumDepth;
|
|
86
|
+
private _accumCount;
|
|
87
|
+
private _hiZ;
|
|
88
|
+
private _hiZLevels;
|
|
89
|
+
private _hiZBuildParams;
|
|
90
|
+
private _boundHiZParams;
|
|
91
|
+
private _width;
|
|
92
|
+
private _height;
|
|
93
|
+
private _outWidth;
|
|
94
|
+
private _outHeight;
|
|
95
|
+
private _upsampleN;
|
|
96
|
+
private _jitterX;
|
|
97
|
+
private _jitterY;
|
|
98
|
+
private _view;
|
|
99
|
+
private _viewProjection;
|
|
100
|
+
private _projection;
|
|
101
|
+
private _inverseProjection;
|
|
102
|
+
private _projectedDepth;
|
|
103
|
+
private _reverseDepth;
|
|
104
|
+
private readonly _projectedDepthSpan;
|
|
105
|
+
private _near;
|
|
106
|
+
private _far;
|
|
107
|
+
private _focalX;
|
|
108
|
+
private _focalY;
|
|
109
|
+
private _camX;
|
|
110
|
+
private _camY;
|
|
111
|
+
private _camZ;
|
|
112
|
+
private _viewZMin;
|
|
113
|
+
private _viewZMax;
|
|
114
|
+
private _projZ;
|
|
115
|
+
private _frameIndex;
|
|
116
|
+
private _parts;
|
|
117
|
+
private _partBuffers;
|
|
118
|
+
private _partUseFrames;
|
|
119
|
+
private _partSlot;
|
|
120
|
+
private _partCount;
|
|
121
|
+
private _prevPartData;
|
|
122
|
+
private _accumGeneration;
|
|
123
|
+
private _lastRenderedGeneration;
|
|
124
|
+
private _prevVp;
|
|
125
|
+
private _hasPrevVp;
|
|
126
|
+
/** Cap on each output pixel's accumulated sample count (clamped to 1..65535). Past the cap later
|
|
127
|
+
* samples blend in at 1/(cap+1), so the image keeps refreshing instead of freezing. */
|
|
128
|
+
maxAccumFrames: number;
|
|
129
|
+
/**
|
|
130
|
+
* Largest storage buffer this device can allocate and bind, in bytes. Both the per-Gaussian screen
|
|
131
|
+
* data and the accumulation buffers scale linearly with the workload and can exceed it.
|
|
132
|
+
* @returns the effective storage buffer size limit in bytes
|
|
133
|
+
*/
|
|
134
|
+
private _getMaxStorageBufferSize;
|
|
135
|
+
/**
|
|
136
|
+
* True when the storage buffers required by the given workload fit in the device limits. Callers must
|
|
137
|
+
* fall back to another renderer when it is false, otherwise buffer creation raises a validation error.
|
|
138
|
+
* @param gaussianCount number of Gaussians to render
|
|
139
|
+
* @param shDegree spherical-harmonics degree of the data (0-4)
|
|
140
|
+
* @param outWidth output (full) width in pixels
|
|
141
|
+
* @param outHeight output (full) height in pixels
|
|
142
|
+
* @returns whether the workload can be allocated on this device
|
|
143
|
+
*/
|
|
144
|
+
supportsWorkload(gaussianCount: number, shDegree: number, outWidth: number, outHeight: number): boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Creates a new Gaussian Point Splatting renderer.
|
|
147
|
+
* @param engine the (WebGPU) engine to allocate compute resources on
|
|
148
|
+
*/
|
|
149
|
+
constructor(engine: AbstractEngine);
|
|
150
|
+
/**
|
|
151
|
+
* (Re)creates the preprocess shader so only the asset's SH bands are compiled.
|
|
152
|
+
* @param shDegree the asset's SH degree
|
|
153
|
+
*/
|
|
154
|
+
private _createPreprocessCs;
|
|
155
|
+
/**
|
|
156
|
+
* The resolved, full-float accumulation buffer (`array<vec4f>`, row-major, y * width + x). Bound
|
|
157
|
+
* read-only by the blit material's fragment shader. Null until the first render.
|
|
158
|
+
*/
|
|
159
|
+
get accumBuffer(): Nullable<StorageBuffer>;
|
|
160
|
+
/**
|
|
161
|
+
* Per-pixel resolved surface depth (NDC z in the scene's convention), bound read-only by the blit
|
|
162
|
+
* material to write fragDepth for compositing. Null until the first render.
|
|
163
|
+
*/
|
|
164
|
+
get accumDepthBuffer(): Nullable<StorageBuffer>;
|
|
165
|
+
/**
|
|
166
|
+
* Number of compute frames successfully dispatched since this renderer was created.
|
|
167
|
+
* This does not reset when accumulated samples are invalidated.
|
|
168
|
+
* @returns the lifetime successful-dispatch count
|
|
169
|
+
*/
|
|
170
|
+
get renderedFrameCount(): number;
|
|
171
|
+
/**
|
|
172
|
+
* Changes whenever accumulated samples are invalidated (camera, parts, data, density or output size).
|
|
173
|
+
* A change of the upscale factor alone does not bump it; callers must reset accumulation. Wraps at 65536.
|
|
174
|
+
* @returns the current accumulation generation
|
|
175
|
+
*/
|
|
176
|
+
get accumulationVersion(): number;
|
|
177
|
+
/**
|
|
178
|
+
* Number of frames required to visit every output pixel once at the current render scale.
|
|
179
|
+
* @returns the current jitter-cycle length, `N * N`
|
|
180
|
+
*/
|
|
181
|
+
get pixelCycleLength(): number;
|
|
182
|
+
/**
|
|
183
|
+
* Reads back the total emitted point count from the last dispatched frame (async GPU readback). Used by
|
|
184
|
+
* the budget-driven auto render-scale controller.
|
|
185
|
+
* @returns the emitted point count (0 if never dispatched)
|
|
186
|
+
*/
|
|
187
|
+
readPointCountAsync(): Promise<number>;
|
|
188
|
+
/** Current internal render width, in pixels. */
|
|
189
|
+
get width(): number;
|
|
190
|
+
/** Current internal render height, in pixels. */
|
|
191
|
+
get height(): number;
|
|
192
|
+
/** Output (full) width the accumulation buffer is sized to (what the blit samples). */
|
|
193
|
+
get outputWidth(): number;
|
|
194
|
+
/** Output (full) height the accumulation buffer is sized to. */
|
|
195
|
+
get outputHeight(): number;
|
|
196
|
+
/** Number of Gaussians currently loaded. */
|
|
197
|
+
get gaussianCount(): number;
|
|
198
|
+
/**
|
|
199
|
+
* Whether the whole compute pipeline is compiled and ready to dispatch.
|
|
200
|
+
* @returns true once every compute shader is ready
|
|
201
|
+
*/
|
|
202
|
+
isReady(): boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Uploads decoded splat data into per-Gaussian GPU buffers, replacing any previous data.
|
|
205
|
+
* @param means packed positions, 4 floats per Gaussian (x, y, z, unused)
|
|
206
|
+
* @param cov3d packed 3D covariance, 4 u32 per Gaussian (3 f16 pairs of Sigma/factor + f32 factor)
|
|
207
|
+
* @param colorOpacity packed RGBA8 base color + opacity, 1 u32 per Gaussian
|
|
208
|
+
* @param sh 8-bit-quantized SH coefficients packed 4 bytes/u32 (GPS_SH_WORDS per Gaussian), or null
|
|
209
|
+
* @param shDegree spherical-harmonics degree (0 = view-independent color)
|
|
210
|
+
* @param count number of Gaussians
|
|
211
|
+
*/
|
|
212
|
+
updateSplats(means: Float32Array, cov3d: Uint32Array, colorOpacity: Uint32Array, sh: Nullable<Uint32Array>, shDegree: number, count: number): void;
|
|
213
|
+
/** Restarts progressive accumulation; each output pixel is overwritten on its next visit. The cached
|
|
214
|
+
* view-projection is kept, otherwise the next {@link renderToBuffer} would detect a move and reset again. */
|
|
215
|
+
resetAccumulation(): void;
|
|
216
|
+
/**
|
|
217
|
+
* Sets the camera state used to project Gaussians on the next render.
|
|
218
|
+
* @param view world-to-view matrix
|
|
219
|
+
* @param viewProjection world-to-clip matrix
|
|
220
|
+
* @param near near plane distance
|
|
221
|
+
* @param far far plane distance
|
|
222
|
+
* @param focalX horizontal focal length in pixels
|
|
223
|
+
* @param focalY vertical focal length in pixels
|
|
224
|
+
* @param camX camera world position x
|
|
225
|
+
* @param camY camera world position y
|
|
226
|
+
* @param camZ camera world position z
|
|
227
|
+
* @param viewZMin the model's minimum view-space depth this frame (depth-key normalization range)
|
|
228
|
+
* @param viewZMax the model's maximum view-space depth this frame
|
|
229
|
+
*/
|
|
230
|
+
setCamera(view: Matrix, viewProjection: Matrix, near: number, far: number, focalX: number, focalY: number, camX: number, camY: number, camZ: number, viewZMin: number, viewZMax: number): void;
|
|
231
|
+
/**
|
|
232
|
+
* Sets the projection matrix's z-row (column-major m10, m11, m14, m15), used by resolve to map the
|
|
233
|
+
* view-z depth key back to ndc.z for fragDepth (it encodes the reverse-Z / half-Z convention).
|
|
234
|
+
* @param m10 projection.m[10]
|
|
235
|
+
* @param m11 projection.m[11]
|
|
236
|
+
* @param m14 projection.m[14]
|
|
237
|
+
* @param m15 projection.m[15]
|
|
238
|
+
*/
|
|
239
|
+
setProjectionZ(m10: number, m11: number, m14: number, m15: number): void;
|
|
240
|
+
/**
|
|
241
|
+
* Sets the full projection for covariance, per-pixel depth and oblique clipping.
|
|
242
|
+
* @param projection camera projection matrix
|
|
243
|
+
* @param inverseProjection inverse of the projection matrix
|
|
244
|
+
* @param reverseDepth whether larger NDC depth values are nearer
|
|
245
|
+
*/
|
|
246
|
+
setProjectionMatrix(projection: Matrix, inverseProjection: Matrix, reverseDepth?: boolean): void;
|
|
247
|
+
/** Bounds projected depth over the model's view-z interval and padded jitter grid, reusing the result.
|
|
248
|
+
* @param maxX maximum NDC x covered by the grid
|
|
249
|
+
* @param maxY maximum NDC y covered by the grid
|
|
250
|
+
* @returns the nearest-first projected depth range for quantization
|
|
251
|
+
*/
|
|
252
|
+
private _getProjectedDepthSpan;
|
|
253
|
+
/**
|
|
254
|
+
* Checks part inputs without changing the current accumulation or dispatch buffers.
|
|
255
|
+
* @param packed packed part records
|
|
256
|
+
* @param count number of parts
|
|
257
|
+
* @returns whether these inputs match the current renderer state
|
|
258
|
+
* @internal
|
|
259
|
+
*/
|
|
260
|
+
_matchesPartData(packed: Float32Array, count: number): boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Uploads the per-part records (see GpsPart) and restarts accumulation when they changed.
|
|
263
|
+
* @param packed part records, `count * 40` floats (world matrix + visibility + 5 debug rows per part)
|
|
264
|
+
* @param count number of parts (at least 1)
|
|
265
|
+
*/
|
|
266
|
+
setPartData(packed: Float32Array, count: number): void;
|
|
267
|
+
private _disposePartBuffers;
|
|
268
|
+
private _ensurePixelBuffers;
|
|
269
|
+
/**
|
|
270
|
+
* Runs the per-frame GPS compute pipeline for the given viewport, leaving the result in
|
|
271
|
+
* {@link accumBuffer}. Allocates/resizes buffers on demand.
|
|
272
|
+
* @param width internal render (low) width in pixels; must be `ceil(outWidth / upsampleN)`
|
|
273
|
+
* @param height internal render (low) height in pixels; must be `ceil(outHeight / upsampleN)`
|
|
274
|
+
* @param outWidth output (full) width the accumulation is reconstructed at
|
|
275
|
+
* @param outHeight output (full) height
|
|
276
|
+
* @param upsampleN integer upscale factor; 1 = no upsampling
|
|
277
|
+
* @param jitterX this frame's sub-cell offset x in [0, N)
|
|
278
|
+
* @param jitterY this frame's sub-cell offset y in [0, N)
|
|
279
|
+
* @returns true if the pipeline dispatched, false if it was not ready / had nothing to draw
|
|
280
|
+
*/
|
|
281
|
+
renderToBuffer(width: number, height: number, outWidth?: number, outHeight?: number, upsampleN?: number, jitterX?: number, jitterY?: number): boolean;
|
|
282
|
+
private _disposeGaussianBuffers;
|
|
283
|
+
/** Releases all GPU resources owned by the renderer. */
|
|
284
|
+
dispose(): void;
|
|
285
|
+
}
|