@babylonjs/core 7.43.0 → 7.44.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/Actions/actionEvent.d.ts +4 -4
- package/Buffers/bufferUtils.d.ts +8 -1
- package/Buffers/bufferUtils.js +15 -0
- package/Buffers/bufferUtils.js.map +1 -1
- package/Culling/Helper/boundingInfoHelper.d.ts +2 -9
- package/Culling/Helper/boundingInfoHelper.js +2 -9
- package/Culling/Helper/boundingInfoHelper.js.map +1 -1
- package/Debug/debugLayer.d.ts +4 -0
- package/Debug/debugLayer.js +9 -0
- package/Debug/debugLayer.js.map +1 -1
- package/Engines/Extensions/engine.renderTarget.js +2 -4
- package/Engines/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTarget.js +2 -4
- package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/abstractEngine.d.ts +19 -1
- package/Engines/abstractEngine.js +48 -9
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/engine.d.ts +6 -3
- package/Engines/engine.js +2 -20
- package/Engines/engine.js.map +1 -1
- package/Engines/renderTargetWrapper.js +2 -2
- package/Engines/renderTargetWrapper.js.map +1 -1
- package/Engines/thinEngine.js +1 -5
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +1 -0
- package/Engines/webgpuEngine.js.map +1 -1
- package/FlowGraph/flowGraphConnection.d.ts +1 -1
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.d.ts +16 -12
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js +63 -27
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.d.ts +72 -0
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js +197 -0
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.d.ts +42 -0
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +78 -0
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.d.ts +3 -19
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js +3 -49
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.d.ts +3 -19
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js +3 -49
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.d.ts +3 -19
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js +3 -49
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.d.ts +2 -17
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js +3 -45
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.d.ts +2 -17
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js +3 -44
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.d.ts +3 -19
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js +3 -49
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/passPostProcessBlock.d.ts +47 -0
- package/FrameGraph/Node/Blocks/PostProcesses/passPostProcessBlock.js +65 -0
- package/FrameGraph/Node/Blocks/PostProcesses/passPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +4 -0
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +9 -0
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/index.d.ts +2 -0
- package/FrameGraph/Node/Blocks/index.js +2 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.d.ts +4 -2
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.js +2 -0
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraph.d.ts +3 -2
- package/FrameGraph/Node/nodeRenderGraph.js +4 -3
- package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraphBlock.js +4 -4
- package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.d.ts +8 -0
- package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js +10 -0
- package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraphConnectionPointCustomObject.d.ts +21 -0
- package/FrameGraph/Node/nodeRenderGraphConnectionPointCustomObject.js +31 -0
- package/FrameGraph/Node/nodeRenderGraphConnectionPointCustomObject.js.map +1 -0
- package/FrameGraph/Passes/pass.d.ts +1 -0
- package/FrameGraph/Passes/pass.js +4 -1
- package/FrameGraph/Passes/pass.js.map +1 -1
- package/FrameGraph/Tasks/Layers/baseLayerTask.d.ts +81 -0
- package/FrameGraph/Tasks/Layers/baseLayerTask.js +304 -0
- package/FrameGraph/Tasks/Layers/baseLayerTask.js.map +1 -0
- package/FrameGraph/Tasks/Layers/glowLayerTask.d.ts +3 -40
- package/FrameGraph/Tasks/Layers/glowLayerTask.js +4 -158
- package/FrameGraph/Tasks/Layers/glowLayerTask.js.map +1 -1
- package/FrameGraph/Tasks/Layers/highlightLayerTask.d.ts +21 -0
- package/FrameGraph/Tasks/Layers/highlightLayerTask.js +32 -0
- package/FrameGraph/Tasks/Layers/highlightLayerTask.js.map +1 -0
- package/FrameGraph/Tasks/Misc/executeTask.d.ts +2 -2
- package/FrameGraph/Tasks/Misc/executeTask.js +1 -0
- package/FrameGraph/Tasks/Misc/executeTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js +1 -1
- package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/bloomTask.js +1 -1
- package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js +5 -4
- package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js +5 -4
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js +2 -4
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/passTask.d.ts +29 -0
- package/FrameGraph/Tasks/PostProcesses/passTask.js +31 -0
- package/FrameGraph/Tasks/PostProcesses/passTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +4 -2
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +2 -2
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js +1 -0
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.d.ts +2 -2
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js +1 -0
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Texture/clearTextureTask.d.ts +2 -2
- package/FrameGraph/Tasks/Texture/clearTextureTask.js +1 -0
- package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
- package/FrameGraph/Tasks/Texture/copyToTextureTask.js +1 -1
- package/FrameGraph/Tasks/Texture/copyToTextureTask.js.map +1 -1
- package/FrameGraph/frameGraph.d.ts +8 -2
- package/FrameGraph/frameGraph.js +31 -5
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/frameGraphRenderContext.d.ts +10 -0
- package/FrameGraph/frameGraphRenderContext.js +14 -0
- package/FrameGraph/frameGraphRenderContext.js.map +1 -1
- package/FrameGraph/frameGraphTask.d.ts +3 -2
- package/FrameGraph/frameGraphTask.js +12 -2
- package/FrameGraph/frameGraphTask.js.map +1 -1
- package/FrameGraph/frameGraphTextureManager.d.ts +1 -1
- package/FrameGraph/frameGraphTypes.d.ts +4 -0
- package/FrameGraph/frameGraphTypes.js.map +1 -1
- package/FrameGraph/index.d.ts +2 -0
- package/FrameGraph/index.js +2 -0
- package/FrameGraph/index.js.map +1 -1
- package/Gizmos/planeRotationGizmo.js +10 -0
- package/Gizmos/planeRotationGizmo.js.map +1 -1
- package/Helpers/environmentHelper.js +7 -6
- package/Helpers/environmentHelper.js.map +1 -1
- package/Inputs/scene.inputManager.js +2 -2
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Layers/effectLayer.d.ts +1 -1
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.d.ts +2 -14
- package/Layers/glowLayer.js +34 -36
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.d.ts +13 -74
- package/Layers/highlightLayer.js +123 -309
- package/Layers/highlightLayer.js.map +1 -1
- package/Layers/index.d.ts +1 -0
- package/Layers/index.js +1 -0
- package/Layers/index.js.map +1 -1
- package/Layers/thinEffectLayer.d.ts +55 -2
- package/Layers/thinEffectLayer.js +66 -0
- package/Layers/thinEffectLayer.js.map +1 -1
- package/Layers/thinGlowLayer.d.ts +3 -6
- package/Layers/thinGlowLayer.js +4 -1
- package/Layers/thinGlowLayer.js.map +1 -1
- package/Layers/thinHighlightLayer.d.ts +197 -0
- package/Layers/thinHighlightLayer.js +417 -0
- package/Layers/thinHighlightLayer.js.map +1 -0
- package/Materials/GreasedLine/greasedLinePluginMaterial.d.ts +6 -2
- package/Materials/GreasedLine/greasedLinePluginMaterial.js +8 -2
- package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -1
- package/Materials/GreasedLine/greasedLinePluginMaterialShadersWGSL.js +11 -3
- package/Materials/GreasedLine/greasedLinePluginMaterialShadersWGSL.js.map +1 -1
- package/Materials/GreasedLine/greasedLineSimpleMaterial.d.ts +1 -0
- package/Materials/GreasedLine/greasedLineSimpleMaterial.js +1 -0
- package/Materials/GreasedLine/greasedLineSimpleMaterial.js.map +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.js +1 -3
- package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +3 -3
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +4 -2
- package/Materials/Node/nodeMaterial.js +9 -6
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.js +1 -0
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/Filtering/hdrFiltering.js +1 -0
- package/Materials/Textures/Filtering/hdrFiltering.js.map +1 -1
- package/Materials/Textures/Filtering/hdrIrradianceFiltering.d.ts +69 -0
- package/Materials/Textures/Filtering/hdrIrradianceFiltering.js +187 -0
- package/Materials/Textures/Filtering/hdrIrradianceFiltering.js.map +1 -0
- package/Materials/Textures/hdrCubeTexture.d.ts +5 -1
- package/Materials/Textures/hdrCubeTexture.js +29 -3
- package/Materials/Textures/hdrCubeTexture.js.map +1 -1
- package/Materials/Textures/index.d.ts +4 -0
- package/Materials/Textures/index.js +4 -0
- package/Materials/Textures/index.js.map +1 -1
- package/Materials/effect.d.ts +5 -0
- package/Materials/effect.js +15 -0
- package/Materials/effect.js.map +1 -1
- package/Materials/standardMaterial.d.ts +1 -2
- package/Materials/standardMaterial.js +0 -2
- package/Materials/standardMaterial.js.map +1 -1
- package/Meshes/Builders/planeBuilder.js +2 -2
- package/Meshes/Builders/planeBuilder.js.map +1 -1
- package/Meshes/Compression/dracoCodec.d.ts +4 -4
- package/Meshes/Compression/dracoCodec.js.map +1 -1
- package/Meshes/Compression/dracoCompression.d.ts +5 -3
- package/Meshes/Compression/dracoCompression.js +24 -11
- package/Meshes/Compression/dracoCompression.js.map +1 -1
- package/Meshes/Compression/dracoCompressionWorker.d.ts +16 -30
- package/Meshes/Compression/dracoCompressionWorker.js +128 -22
- package/Meshes/Compression/dracoCompressionWorker.js.map +1 -1
- package/Meshes/Compression/dracoDecoder.d.ts +4 -9
- package/Meshes/Compression/dracoDecoder.js +5 -5
- package/Meshes/Compression/dracoDecoder.js.map +1 -1
- package/Meshes/Compression/dracoDecoder.types.d.ts +52 -0
- package/Meshes/Compression/dracoDecoder.types.js +2 -0
- package/Meshes/Compression/dracoDecoder.types.js.map +1 -0
- package/Meshes/Compression/dracoEncoder.d.ts +95 -0
- package/Meshes/Compression/dracoEncoder.js +245 -0
- package/Meshes/Compression/dracoEncoder.js.map +1 -0
- package/Meshes/Compression/dracoEncoder.types.d.ts +82 -0
- package/Meshes/Compression/dracoEncoder.types.js +2 -0
- package/Meshes/Compression/dracoEncoder.types.js.map +1 -0
- package/Meshes/Compression/index.d.ts +1 -0
- package/Meshes/Compression/index.js +1 -0
- package/Meshes/Compression/index.js.map +1 -1
- package/Meshes/Compression/meshoptCompression.js +17 -2
- package/Meshes/Compression/meshoptCompression.js.map +1 -1
- package/Meshes/Compression/test/integration/draco.test.d.ts +1 -0
- package/Meshes/Compression/test/integration/draco.test.js +30 -0
- package/Meshes/Compression/test/integration/draco.test.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +92 -2
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +286 -10
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineBaseMesh.js +4 -2
- package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.js +1 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.d.ts +1 -1
- package/Meshes/csg.js +4 -0
- package/Meshes/csg.js.map +1 -1
- package/Meshes/mesh.d.ts +2 -2
- package/Meshes/transformNode.d.ts +4 -1
- package/Meshes/transformNode.js +6 -1
- package/Meshes/transformNode.js.map +1 -1
- package/Misc/copyTextureToTexture.js +1 -1
- package/Misc/copyTextureToTexture.js.map +1 -1
- package/Misc/decorators.serialization.js +2 -0
- package/Misc/decorators.serialization.js.map +1 -1
- package/Misc/greasedLineTools.d.ts +1 -1
- package/Misc/logger.d.ts +2 -1
- package/Misc/logger.js +2 -1
- package/Misc/logger.js.map +1 -1
- package/Misc/screenshotTools.js +58 -5
- package/Misc/screenshotTools.js.map +1 -1
- package/Misc/tools.d.ts +21 -1
- package/Misc/tools.js +33 -0
- package/Misc/tools.js.map +1 -1
- package/Morph/morphTargetManager.d.ts +1 -0
- package/Morph/morphTargetManager.js +6 -1
- package/Morph/morphTargetManager.js.map +1 -1
- package/Particles/particleHelper.js +2 -1
- package/Particles/particleHelper.js.map +1 -1
- package/Particles/particleSystemSet.d.ts +1 -0
- package/Particles/particleSystemSet.js +1 -0
- package/Particles/particleSystemSet.js.map +1 -1
- package/Particles/pointsCloudSystem.d.ts +3 -3
- package/Particles/webgl2ParticleSystem.d.ts +1 -1
- package/Particles/webgl2ParticleSystem.js +1 -2
- package/Particles/webgl2ParticleSystem.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.d.ts +2 -2
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +2 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/index.d.ts +1 -0
- package/PostProcesses/index.js +1 -0
- package/PostProcesses/index.js.map +1 -1
- package/PostProcesses/passPostProcess.d.ts +2 -3
- package/PostProcesses/passPostProcess.js +36 -48
- package/PostProcesses/passPostProcess.js.map +1 -1
- package/PostProcesses/thinPassPostProcess.d.ts +48 -0
- package/PostProcesses/thinPassPostProcess.js +113 -0
- package/PostProcesses/thinPassPostProcess.js.map +1 -0
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js.map +1 -1
- package/Rendering/depthRenderer.js +1 -1
- package/Rendering/depthRenderer.js.map +1 -1
- package/Rendering/iblCdfGenerator.d.ts +13 -5
- package/Rendering/iblCdfGenerator.js +67 -10
- package/Rendering/iblCdfGenerator.js.map +1 -1
- package/Rendering/objectRenderer.d.ts +5 -3
- package/Rendering/objectRenderer.js +5 -3
- package/Rendering/objectRenderer.js.map +1 -1
- package/Rendering/renderingManager.d.ts +4 -0
- package/Rendering/renderingManager.js +1 -0
- package/Rendering/renderingManager.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js +6 -6
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/ShadersInclude/intersectionFunctions.d.ts +5 -0
- package/Shaders/ShadersInclude/intersectionFunctions.js +14 -0
- package/Shaders/ShadersInclude/intersectionFunctions.js.map +1 -0
- package/Shaders/ShadersInclude/pbrBlockReflection.js +13 -8
- package/Shaders/ShadersInclude/pbrBlockReflection.js.map +1 -1
- package/Shaders/background.fragment.d.ts +1 -0
- package/Shaders/background.fragment.js +3 -5
- package/Shaders/background.fragment.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +2 -1
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/hdrIrradianceFiltering.fragment.d.ts +9 -0
- package/Shaders/hdrIrradianceFiltering.fragment.js +25 -0
- package/Shaders/hdrIrradianceFiltering.fragment.js.map +1 -0
- package/Shaders/hdrIrradianceFiltering.vertex.d.ts +5 -0
- package/Shaders/hdrIrradianceFiltering.vertex.js +15 -0
- package/Shaders/hdrIrradianceFiltering.vertex.js.map +1 -0
- package/Shaders/pbr.fragment.js +1 -3
- package/Shaders/pbr.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/intersectionFunctions.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/intersectionFunctions.js +14 -0
- package/ShadersWGSL/ShadersInclude/intersectionFunctions.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/pbrBlockReflection.js +13 -8
- package/ShadersWGSL/ShadersInclude/pbrBlockReflection.js.map +1 -1
- package/ShadersWGSL/background.fragment.d.ts +1 -0
- package/ShadersWGSL/background.fragment.js +3 -5
- package/ShadersWGSL/background.fragment.js.map +1 -1
- package/ShadersWGSL/greasedLine.fragment.js +9 -3
- package/ShadersWGSL/greasedLine.fragment.js.map +1 -1
- package/ShadersWGSL/greasedLine.vertex.js +12 -2
- package/ShadersWGSL/greasedLine.vertex.js.map +1 -1
- package/ShadersWGSL/hdrIrradianceFiltering.fragment.d.ts +9 -0
- package/ShadersWGSL/hdrIrradianceFiltering.fragment.js +26 -0
- package/ShadersWGSL/hdrIrradianceFiltering.fragment.js.map +1 -0
- package/ShadersWGSL/hdrIrradianceFiltering.vertex.d.ts +5 -0
- package/ShadersWGSL/hdrIrradianceFiltering.vertex.js +16 -0
- package/ShadersWGSL/hdrIrradianceFiltering.vertex.js.map +1 -0
- package/ShadersWGSL/outline.fragment.js +1 -1
- package/ShadersWGSL/outline.fragment.js.map +1 -1
- package/ShadersWGSL/passCube.fragment.js +1 -1
- package/ShadersWGSL/passCube.fragment.js.map +1 -1
- package/ShadersWGSL/pbr.fragment.js +1 -3
- package/ShadersWGSL/pbr.fragment.js.map +1 -1
- package/XR/features/WebXRDepthSensing.d.ts +24 -2
- package/XR/features/WebXRDepthSensing.js +320 -26
- package/XR/features/WebXRDepthSensing.js.map +1 -1
- package/XR/features/WebXRHandTracking.js +8 -7
- package/XR/features/WebXRHandTracking.js.map +1 -1
- package/package.json +1 -1
- package/scene.js +9 -5
- package/scene.js.map +1 -1
- package/types.d.ts +4 -0
- package/types.js.map +1 -1
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { __decorate } from "../../../../tslib.es6.js";
|
|
2
|
-
import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
|
|
3
2
|
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
4
|
-
import { NodeRenderGraphBlockConnectionPointTypes } from "../../Types/nodeRenderGraphTypes.js";
|
|
5
3
|
import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
|
|
6
4
|
import { FrameGraphExtractHighlightsTask } from "../../../Tasks/PostProcesses/extractHighlightsTask.js";
|
|
7
5
|
import { ThinExtractHighlightsPostProcess } from "../../../../PostProcesses/thinExtractHighlightsPostProcess.js";
|
|
6
|
+
import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock.js";
|
|
8
7
|
/**
|
|
9
8
|
* Block that implements the extract highlights post process
|
|
10
9
|
*/
|
|
11
|
-
export class NodeRenderGraphExtractHighlightsPostProcessBlock extends
|
|
10
|
+
export class NodeRenderGraphExtractHighlightsPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
|
|
12
11
|
/**
|
|
13
12
|
* Gets the frame graph task associated with this block
|
|
14
13
|
*/
|
|
@@ -23,24 +22,9 @@ export class NodeRenderGraphExtractHighlightsPostProcessBlock extends NodeRender
|
|
|
23
22
|
*/
|
|
24
23
|
constructor(name, frameGraph, scene) {
|
|
25
24
|
super(name, frameGraph, scene);
|
|
26
|
-
this.
|
|
27
|
-
this.registerInput("destination", NodeRenderGraphBlockConnectionPointTypes.Texture, true);
|
|
28
|
-
this._addDependenciesInput();
|
|
29
|
-
this.registerOutput("output", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
|
|
30
|
-
this.source.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);
|
|
31
|
-
this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAll);
|
|
32
|
-
this.output._typeConnectionSource = () => {
|
|
33
|
-
return this.destination.isConnected ? this.destination : this.source;
|
|
34
|
-
};
|
|
25
|
+
this._finalizeInputOutputRegistering();
|
|
35
26
|
this._frameGraphTask = new FrameGraphExtractHighlightsTask(this.name, frameGraph, new ThinExtractHighlightsPostProcess(name, scene.getEngine()));
|
|
36
27
|
}
|
|
37
|
-
/** Sampling mode used to sample from the source texture */
|
|
38
|
-
get sourceSamplingMode() {
|
|
39
|
-
return this._frameGraphTask.sourceSamplingMode;
|
|
40
|
-
}
|
|
41
|
-
set sourceSamplingMode(value) {
|
|
42
|
-
this._frameGraphTask.sourceSamplingMode = value;
|
|
43
|
-
}
|
|
44
28
|
/** The luminance threshold, pixels below this value will be set to black. */
|
|
45
29
|
get threshold() {
|
|
46
30
|
return this._frameGraphTask.postProcess.threshold;
|
|
@@ -55,51 +39,21 @@ export class NodeRenderGraphExtractHighlightsPostProcessBlock extends NodeRender
|
|
|
55
39
|
getClassName() {
|
|
56
40
|
return "NodeRenderGraphExtractHighlightsPostProcessBlock";
|
|
57
41
|
}
|
|
58
|
-
/**
|
|
59
|
-
* Gets the source input component
|
|
60
|
-
*/
|
|
61
|
-
get source() {
|
|
62
|
-
return this._inputs[0];
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Gets the destination input component
|
|
66
|
-
*/
|
|
67
|
-
get destination() {
|
|
68
|
-
return this._inputs[1];
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Gets the output component
|
|
72
|
-
*/
|
|
73
|
-
get output() {
|
|
74
|
-
return this._outputs[0];
|
|
75
|
-
}
|
|
76
|
-
_buildBlock(state) {
|
|
77
|
-
super._buildBlock(state);
|
|
78
|
-
this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the "output" texture of the task
|
|
79
|
-
this._frameGraphTask.sourceTexture = this.source.connectedPoint?.value;
|
|
80
|
-
this._frameGraphTask.destinationTexture = this.destination.connectedPoint?.value;
|
|
81
|
-
}
|
|
82
42
|
_dumpPropertiesCode() {
|
|
83
43
|
const codes = [];
|
|
84
44
|
codes.push(`${this._codeVariableName}.threshold = ${this.threshold};`);
|
|
85
|
-
codes.push(`${this._codeVariableName}.sourceSamplingMode = ${this.sourceSamplingMode};`);
|
|
86
45
|
return super._dumpPropertiesCode() + codes.join("\n");
|
|
87
46
|
}
|
|
88
47
|
serialize() {
|
|
89
48
|
const serializationObject = super.serialize();
|
|
90
49
|
serializationObject.threshold = this.threshold;
|
|
91
|
-
serializationObject.sourceSamplingMode = this.sourceSamplingMode;
|
|
92
50
|
return serializationObject;
|
|
93
51
|
}
|
|
94
52
|
_deserialize(serializationObject) {
|
|
95
53
|
super._deserialize(serializationObject);
|
|
96
54
|
this.threshold = serializationObject.threshold;
|
|
97
|
-
this.sourceSamplingMode = serializationObject.sourceSamplingMode;
|
|
98
55
|
}
|
|
99
56
|
}
|
|
100
|
-
__decorate([
|
|
101
|
-
editableInPropertyPage("Source sampling mode", 6 /* PropertyTypeForEdition.SamplingMode */, "PROPERTIES")
|
|
102
|
-
], NodeRenderGraphExtractHighlightsPostProcessBlock.prototype, "sourceSamplingMode", null);
|
|
103
57
|
__decorate([
|
|
104
58
|
editableInPropertyPage("Threshold", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 1 })
|
|
105
59
|
], NodeRenderGraphExtractHighlightsPostProcessBlock.prototype, "threshold", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractHighlightsPostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"extractHighlightsPostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,+BAA+B,EAAE,8DAAkE;AAC5G,OAAO,EAAE,gCAAgC,EAAE,sEAA4D;AACvG,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAE7E;;GAEG;AACH,MAAM,OAAO,gDAAiD,SAAQ,mCAAmC;IAGrG;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,+BAA+B,EAAE,CAAC;QAEvC,IAAI,CAAC,eAAe,GAAG,IAAI,+BAA+B,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,gCAAgC,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACrJ,CAAC;IAED,6EAA6E;IAE7E,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,SAAS,CAAC;IACtD,CAAC;IAED,IAAW,SAAS,CAAC,KAAa;QAC9B,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,SAAS,GAAG,KAAK,CAAC;IACvD,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,kDAAkD,CAAC;IAC9D,CAAC;IAEkB,mBAAmB;QAClC,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,gBAAgB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACvE,OAAO,KAAK,CAAC,mBAAmB,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;IAEe,SAAS;QACrB,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAC9C,mBAAmB,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAC/C,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC;IACnD,CAAC;CACJ;AAhCG;IADC,sBAAsB,CAAC,WAAW,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;iFAGnG;AAgCL,aAAa,CAAC,0DAA0D,EAAE,gDAAgD,CAAC,CAAC","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Scene, FrameGraph } from \"core/index\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { FrameGraphExtractHighlightsTask } from \"core/FrameGraph/Tasks/PostProcesses/extractHighlightsTask\";\r\nimport { ThinExtractHighlightsPostProcess } from \"core/PostProcesses/thinExtractHighlightsPostProcess\";\r\nimport { NodeRenderGraphBasePostProcessBlock } from \"./basePostProcessBlock\";\r\n\r\n/**\r\n * Block that implements the extract highlights post process\r\n */\r\nexport class NodeRenderGraphExtractHighlightsPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphExtractHighlightsTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new ExtractHighlightsPostProcessBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphExtractHighlightsTask(this.name, frameGraph, new ThinExtractHighlightsPostProcess(name, scene.getEngine()));\r\n }\r\n\r\n /** The luminance threshold, pixels below this value will be set to black. */\r\n @editableInPropertyPage(\"Threshold\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 1 })\r\n public get threshold(): number {\r\n return this._frameGraphTask.postProcess.threshold;\r\n }\r\n\r\n public set threshold(value: number) {\r\n this._frameGraphTask.postProcess.threshold = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphExtractHighlightsPostProcessBlock\";\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.threshold = ${this.threshold};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.threshold = this.threshold;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.threshold = serializationObject.threshold;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphExtractHighlightsPostProcessBlock\", NodeRenderGraphExtractHighlightsPostProcessBlock);\r\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Scene, FrameGraph } from "../../../../index.js";
|
|
2
|
+
import { FrameGraphPassCubeTask, FrameGraphPassTask } from "../../../Tasks/PostProcesses/passTask.js";
|
|
3
|
+
import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock";
|
|
4
|
+
/**
|
|
5
|
+
* Block that implements the pass post process
|
|
6
|
+
*/
|
|
7
|
+
export declare class NodeRenderGraphPassPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
|
|
8
|
+
protected _frameGraphTask: FrameGraphPassTask;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the frame graph task associated with this block
|
|
11
|
+
*/
|
|
12
|
+
get task(): FrameGraphPassTask;
|
|
13
|
+
/**
|
|
14
|
+
* Create a new NodeRenderGraphPassPostProcessBlock
|
|
15
|
+
* @param name defines the block name
|
|
16
|
+
* @param frameGraph defines the hosting frame graph
|
|
17
|
+
* @param scene defines the hosting scene
|
|
18
|
+
*/
|
|
19
|
+
constructor(name: string, frameGraph: FrameGraph, scene: Scene);
|
|
20
|
+
/**
|
|
21
|
+
* Gets the current class name
|
|
22
|
+
* @returns the class name
|
|
23
|
+
*/
|
|
24
|
+
getClassName(): string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Block that implements the pass cube post process
|
|
28
|
+
*/
|
|
29
|
+
export declare class NodeRenderGraphPassCubePostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
|
|
30
|
+
protected _frameGraphTask: FrameGraphPassCubeTask;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the frame graph task associated with this block
|
|
33
|
+
*/
|
|
34
|
+
get task(): FrameGraphPassCubeTask;
|
|
35
|
+
/**
|
|
36
|
+
* Create a new NodeRenderGraphPassCubePostProcessBlock
|
|
37
|
+
* @param name defines the block name
|
|
38
|
+
* @param frameGraph defines the hosting frame graph
|
|
39
|
+
* @param scene defines the hosting scene
|
|
40
|
+
*/
|
|
41
|
+
constructor(name: string, frameGraph: FrameGraph, scene: Scene);
|
|
42
|
+
/**
|
|
43
|
+
* Gets the current class name
|
|
44
|
+
* @returns the class name
|
|
45
|
+
*/
|
|
46
|
+
getClassName(): string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
2
|
+
import { FrameGraphPassCubeTask, FrameGraphPassTask } from "../../../Tasks/PostProcesses/passTask.js";
|
|
3
|
+
import { ThinPassCubePostProcess, ThinPassPostProcess } from "../../../../PostProcesses/thinPassPostProcess.js";
|
|
4
|
+
import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock.js";
|
|
5
|
+
/**
|
|
6
|
+
* Block that implements the pass post process
|
|
7
|
+
*/
|
|
8
|
+
export class NodeRenderGraphPassPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
|
|
9
|
+
/**
|
|
10
|
+
* Gets the frame graph task associated with this block
|
|
11
|
+
*/
|
|
12
|
+
get task() {
|
|
13
|
+
return this._frameGraphTask;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Create a new NodeRenderGraphPassPostProcessBlock
|
|
17
|
+
* @param name defines the block name
|
|
18
|
+
* @param frameGraph defines the hosting frame graph
|
|
19
|
+
* @param scene defines the hosting scene
|
|
20
|
+
*/
|
|
21
|
+
constructor(name, frameGraph, scene) {
|
|
22
|
+
super(name, frameGraph, scene);
|
|
23
|
+
this._finalizeInputOutputRegistering();
|
|
24
|
+
this._frameGraphTask = new FrameGraphPassTask(this.name, frameGraph, new ThinPassPostProcess(name, scene.getEngine()));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Gets the current class name
|
|
28
|
+
* @returns the class name
|
|
29
|
+
*/
|
|
30
|
+
getClassName() {
|
|
31
|
+
return "NodeRenderGraphPassPostProcessBlock";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
RegisterClass("BABYLON.NodeRenderGraphPassPostProcessBlock", NodeRenderGraphPassPostProcessBlock);
|
|
35
|
+
/**
|
|
36
|
+
* Block that implements the pass cube post process
|
|
37
|
+
*/
|
|
38
|
+
export class NodeRenderGraphPassCubePostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
|
|
39
|
+
/**
|
|
40
|
+
* Gets the frame graph task associated with this block
|
|
41
|
+
*/
|
|
42
|
+
get task() {
|
|
43
|
+
return this._frameGraphTask;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create a new NodeRenderGraphPassCubePostProcessBlock
|
|
47
|
+
* @param name defines the block name
|
|
48
|
+
* @param frameGraph defines the hosting frame graph
|
|
49
|
+
* @param scene defines the hosting scene
|
|
50
|
+
*/
|
|
51
|
+
constructor(name, frameGraph, scene) {
|
|
52
|
+
super(name, frameGraph, scene);
|
|
53
|
+
this._finalizeInputOutputRegistering();
|
|
54
|
+
this._frameGraphTask = new FrameGraphPassCubeTask(this.name, frameGraph, new ThinPassCubePostProcess(name, scene.getEngine()));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Gets the current class name
|
|
58
|
+
* @returns the class name
|
|
59
|
+
*/
|
|
60
|
+
getClassName() {
|
|
61
|
+
return "NodeRenderGraphPassCubePostProcessBlock";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
RegisterClass("BABYLON.NodeRenderGraphPassCubePostProcessBlock", NodeRenderGraphPassCubePostProcessBlock);
|
|
65
|
+
//# sourceMappingURL=passPostProcessBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passPostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/passPostProcessBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,iDAAqD;AAC1G,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,yDAA+C;AACtG,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAE7E;;GAEG;A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\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { FrameGraphPassCubeTask, FrameGraphPassTask } from \"core/FrameGraph/Tasks/PostProcesses/passTask\";\r\nimport { ThinPassCubePostProcess, ThinPassPostProcess } from \"core/PostProcesses/thinPassPostProcess\";\r\nimport { NodeRenderGraphBasePostProcessBlock } from \"./basePostProcessBlock\";\r\n\r\n/**\r\n * Block that implements the pass post process\r\n */\r\nexport class NodeRenderGraphPassPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphPassTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphPassPostProcessBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphPassTask(this.name, frameGraph, new ThinPassPostProcess(name, scene.getEngine()));\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphPassPostProcessBlock\";\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphPassPostProcessBlock\", NodeRenderGraphPassPostProcessBlock);\r\n\r\n/**\r\n * Block that implements the pass cube post process\r\n */\r\nexport class NodeRenderGraphPassCubePostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphPassCubeTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphPassCubePostProcessBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphPassCubeTask(this.name, frameGraph, new ThinPassCubePostProcess(name, scene.getEngine()));\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphPassCubePostProcessBlock\";\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphPassCubePostProcessBlock\", NodeRenderGraphPassCubePostProcessBlock);\r\n"]}
|
|
@@ -60,6 +60,10 @@ export declare class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGr
|
|
|
60
60
|
* Gets the output depth component
|
|
61
61
|
*/
|
|
62
62
|
get outputDepth(): NodeRenderGraphConnectionPoint;
|
|
63
|
+
/**
|
|
64
|
+
* Gets the objectRenderer component
|
|
65
|
+
*/
|
|
66
|
+
get objectRenderer(): NodeRenderGraphConnectionPoint;
|
|
63
67
|
protected _buildBlock(state: NodeRenderGraphBuildState): void;
|
|
64
68
|
protected _dumpPropertiesCode(): string;
|
|
65
69
|
serialize(): any;
|
|
@@ -3,6 +3,7 @@ import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
|
|
|
3
3
|
import { NodeRenderGraphBlockConnectionPointTypes } from "../../Types/nodeRenderGraphTypes.js";
|
|
4
4
|
import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
|
|
5
5
|
import { NodeRenderGraphConnectionPoint } from "../../nodeRenderGraphBlockConnectionPoint.js";
|
|
6
|
+
import { NodeRenderGraphConnectionPointCustomObject } from "../../nodeRenderGraphConnectionPointCustomObject.js";
|
|
6
7
|
/**
|
|
7
8
|
* @internal
|
|
8
9
|
*/
|
|
@@ -29,6 +30,7 @@ export class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock
|
|
|
29
30
|
this.registerInput("shadowGenerators", NodeRenderGraphBlockConnectionPointTypes.ShadowGenerator, true);
|
|
30
31
|
this.registerOutput("output", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
|
|
31
32
|
this.registerOutput("outputDepth", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
|
|
33
|
+
this.registerOutput("objectRenderer", NodeRenderGraphBlockConnectionPointTypes.Object, new NodeRenderGraphConnectionPointCustomObject("objectRenderer", this, 1 /* NodeRenderGraphConnectionPointDirection.Output */, NodeRenderGraphBaseObjectRendererBlock, "NodeRenderGraphBaseObjectRendererBlock"));
|
|
32
34
|
this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);
|
|
33
35
|
this.depth.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment);
|
|
34
36
|
this.shadowGenerators.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.ResourceContainer);
|
|
@@ -104,10 +106,17 @@ export class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock
|
|
|
104
106
|
get outputDepth() {
|
|
105
107
|
return this._outputs[1];
|
|
106
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Gets the objectRenderer component
|
|
111
|
+
*/
|
|
112
|
+
get objectRenderer() {
|
|
113
|
+
return this._outputs[2];
|
|
114
|
+
}
|
|
107
115
|
_buildBlock(state) {
|
|
108
116
|
super._buildBlock(state);
|
|
109
117
|
this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the "output" texture of the task
|
|
110
118
|
this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the "outputDepth" texture of the task
|
|
119
|
+
this.objectRenderer.value = this._frameGraphTask; // the value of the objectRenderer connection point is the task itself
|
|
111
120
|
this._frameGraphTask.destinationTexture = this.destination.connectedPoint?.value;
|
|
112
121
|
this._frameGraphTask.depthTexture = this.depth.connectedPoint?.value;
|
|
113
122
|
this._frameGraphTask.camera = this.camera.connectedPoint?.value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseObjectRendererBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.ts"],"names":[],"mappings":";AAYA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,wCAAwC,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAE3F;;GAEG;AACH,MAAM,OAAO,sCAAuC,SAAQ,oBAAoB;IAG5E;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,wCAAwC,CAAC,OAAO,CAAC,CAAC;QACpF,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,wCAAwC,CAAC,uCAAuC,EAAE,IAAI,CAAC,CAAC;QACpH,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,wCAAwC,CAAC,MAAM,CAAC,CAAC;QAC9E,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,wCAAwC,CAAC,UAAU,CAAC,CAAC;QACnF,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,aAAa,CAAC,kBAAkB,EAAE,wCAAwC,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;QAEvG,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,wCAAwC,CAAC,YAAY,CAAC,CAAC;QACrF,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,wCAAwC,CAAC,YAAY,CAAC,CAAC;QAE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,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC;IACrD,CAAC;CACJ;AAlIG;IADC,sBAAsB,CAAC,YAAY,0CAAkC,YAAY,CAAC;uEAGlF;AAQD;IADC,sBAAsB,CAAC,aAAa,0CAAkC,YAAY,CAAC;wEAGnF","sourcesContent":["import type {\r\n Scene,\r\n NodeRenderGraphBuildState,\r\n FrameGraph,\r\n FrameGraphTextureHandle,\r\n FrameGraphObjectList,\r\n Camera,\r\n FrameGraphObjectRendererTask,\r\n NodeRenderGraphResourceContainerBlock,\r\n FrameGraphShadowGeneratorTask,\r\n // eslint-disable-next-line import/no-internal-modules\r\n} from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { NodeRenderGraphConnectionPoint } from \"../../nodeRenderGraphBlockConnectionPoint\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphObjectRendererTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphBaseObjectRendererBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this.registerInput(\"destination\", NodeRenderGraphBlockConnectionPointTypes.Texture);\r\n this.registerInput(\"depth\", NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment, true);\r\n this.registerInput(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\r\n this.registerInput(\"objects\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\r\n this._addDependenciesInput();\r\n this.registerInput(\"shadowGenerators\", NodeRenderGraphBlockConnectionPointTypes.ShadowGenerator, true);\r\n\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\"outputDepth\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);\r\n this.depth.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment);\r\n this.shadowGenerators.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.ResourceContainer);\r\n\r\n this.output._typeConnectionSource = this.destination;\r\n this.outputDepth._typeConnectionSource = this.depth;\r\n }\r\n\r\n /** Indicates if depth testing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth test\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthTest() {\r\n return this._frameGraphTask.depthTest;\r\n }\r\n\r\n public set depthTest(value: boolean) {\r\n this._frameGraphTask.depthTest = value;\r\n }\r\n\r\n /** Indicates if depth writing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth write\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthWrite() {\r\n return this._frameGraphTask.depthWrite;\r\n }\r\n\r\n public set depthWrite(value: boolean) {\r\n this._frameGraphTask.depthWrite = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphBaseObjectRendererBlock\";\r\n }\r\n\r\n /**\r\n * Gets the destination texture input component\r\n */\r\n public get destination(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the depth texture input component\r\n */\r\n public get depth(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the camera input component\r\n */\r\n public get camera(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the objects input component\r\n */\r\n public get objects(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the dependencies input component\r\n */\r\n public get dependencies(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the shadowGenerators input component\r\n */\r\n public get shadowGenerators(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[5];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output depth component\r\n */\r\n public get outputDepth(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the \"output\" texture of the task\r\n\r\n this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the \"outputDepth\" texture of the task\r\n\r\n this._frameGraphTask.destinationTexture = this.destination.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.depthTexture = this.depth.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.camera = this.camera.connectedPoint?.value as Camera;\r\n this._frameGraphTask.objectList = this.objects.connectedPoint?.value as FrameGraphObjectList;\r\n\r\n this._frameGraphTask.shadowGenerators = [];\r\n\r\n const shadowGeneratorsConnectedPoint = this.shadowGenerators.connectedPoint;\r\n if (shadowGeneratorsConnectedPoint) {\r\n if (shadowGeneratorsConnectedPoint.type === NodeRenderGraphBlockConnectionPointTypes.ResourceContainer) {\r\n const container = shadowGeneratorsConnectedPoint.ownerBlock as NodeRenderGraphResourceContainerBlock;\r\n container.inputs.forEach((input) => {\r\n if (input.connectedPoint && input.connectedPoint.value !== undefined && NodeRenderGraphConnectionPoint.IsShadowGenerator(input.connectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators!.push(input.connectedPoint.value as FrameGraphShadowGeneratorTask);\r\n }\r\n });\r\n } else if (NodeRenderGraphConnectionPoint.IsShadowGenerator(shadowGeneratorsConnectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators[0] = shadowGeneratorsConnectedPoint.value as FrameGraphShadowGeneratorTask;\r\n }\r\n }\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.depthTest = ${this.depthTest};`);\r\n codes.push(`${this._codeVariableName}.depthWrite = ${this.depthWrite};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.depthTest = this.depthTest;\r\n serializationObject.depthWrite = this.depthWrite;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.depthTest = serializationObject.depthTest;\r\n this.depthWrite = serializationObject.depthWrite;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"baseObjectRendererBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.ts"],"names":[],"mappings":";AAYA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,wCAAwC,EAA2C,MAAM,kCAAkC,CAAC;AACrI,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,0CAA0C,EAAE,MAAM,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QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC;IACrD,CAAC;CACJ;AAzIG;IADC,sBAAsB,CAAC,YAAY,0CAAkC,YAAY,CAAC;uEAGlF;AAQD;IADC,sBAAsB,CAAC,aAAa,0CAAkC,YAAY,CAAC;wEAGnF","sourcesContent":["import type {\r\n Scene,\r\n NodeRenderGraphBuildState,\r\n FrameGraph,\r\n FrameGraphTextureHandle,\r\n FrameGraphObjectList,\r\n Camera,\r\n FrameGraphObjectRendererTask,\r\n NodeRenderGraphResourceContainerBlock,\r\n FrameGraphShadowGeneratorTask,\r\n // eslint-disable-next-line import/no-internal-modules\r\n} from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes, NodeRenderGraphConnectionPointDirection } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { NodeRenderGraphConnectionPoint } from \"../../nodeRenderGraphBlockConnectionPoint\";\r\nimport { NodeRenderGraphConnectionPointCustomObject } from \"../../nodeRenderGraphConnectionPointCustomObject\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class NodeRenderGraphBaseObjectRendererBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphObjectRendererTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphBaseObjectRendererBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this.registerInput(\"destination\", NodeRenderGraphBlockConnectionPointTypes.Texture);\r\n this.registerInput(\"depth\", NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment, true);\r\n this.registerInput(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\r\n this.registerInput(\"objects\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\r\n this._addDependenciesInput();\r\n this.registerInput(\"shadowGenerators\", NodeRenderGraphBlockConnectionPointTypes.ShadowGenerator, true);\r\n\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\"outputDepth\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n this.registerOutput(\r\n \"objectRenderer\",\r\n NodeRenderGraphBlockConnectionPointTypes.Object,\r\n new NodeRenderGraphConnectionPointCustomObject(\r\n \"objectRenderer\",\r\n this,\r\n NodeRenderGraphConnectionPointDirection.Output,\r\n NodeRenderGraphBaseObjectRendererBlock,\r\n \"NodeRenderGraphBaseObjectRendererBlock\"\r\n )\r\n );\r\n\r\n this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBufferDepthStencil);\r\n this.depth.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment);\r\n this.shadowGenerators.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.ResourceContainer);\r\n\r\n this.output._typeConnectionSource = this.destination;\r\n this.outputDepth._typeConnectionSource = this.depth;\r\n }\r\n\r\n /** Indicates if depth testing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth test\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthTest() {\r\n return this._frameGraphTask.depthTest;\r\n }\r\n\r\n public set depthTest(value: boolean) {\r\n this._frameGraphTask.depthTest = value;\r\n }\r\n\r\n /** Indicates if depth writing must be enabled or disabled */\r\n @editableInPropertyPage(\"Depth write\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get depthWrite() {\r\n return this._frameGraphTask.depthWrite;\r\n }\r\n\r\n public set depthWrite(value: boolean) {\r\n this._frameGraphTask.depthWrite = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphBaseObjectRendererBlock\";\r\n }\r\n\r\n /**\r\n * Gets the destination texture input component\r\n */\r\n public get destination(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the depth texture input component\r\n */\r\n public get depth(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the camera input component\r\n */\r\n public get camera(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the objects input component\r\n */\r\n public get objects(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the dependencies input component\r\n */\r\n public get dependencies(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the shadowGenerators input component\r\n */\r\n public get shadowGenerators(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[5];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output depth component\r\n */\r\n public get outputDepth(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n /**\r\n * Gets the objectRenderer component\r\n */\r\n public get objectRenderer(): NodeRenderGraphConnectionPoint {\r\n return this._outputs[2];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the \"output\" texture of the task\r\n this.outputDepth.value = this._frameGraphTask.outputDepthTexture; // the value of the outputDepth connection point is the \"outputDepth\" texture of the task\r\n this.objectRenderer.value = this._frameGraphTask; // the value of the objectRenderer connection point is the task itself\r\n\r\n this._frameGraphTask.destinationTexture = this.destination.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.depthTexture = this.depth.connectedPoint?.value as FrameGraphTextureHandle;\r\n this._frameGraphTask.camera = this.camera.connectedPoint?.value as Camera;\r\n this._frameGraphTask.objectList = this.objects.connectedPoint?.value as FrameGraphObjectList;\r\n\r\n this._frameGraphTask.shadowGenerators = [];\r\n\r\n const shadowGeneratorsConnectedPoint = this.shadowGenerators.connectedPoint;\r\n if (shadowGeneratorsConnectedPoint) {\r\n if (shadowGeneratorsConnectedPoint.type === NodeRenderGraphBlockConnectionPointTypes.ResourceContainer) {\r\n const container = shadowGeneratorsConnectedPoint.ownerBlock as NodeRenderGraphResourceContainerBlock;\r\n container.inputs.forEach((input) => {\r\n if (input.connectedPoint && input.connectedPoint.value !== undefined && NodeRenderGraphConnectionPoint.IsShadowGenerator(input.connectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators!.push(input.connectedPoint.value as FrameGraphShadowGeneratorTask);\r\n }\r\n });\r\n } else if (NodeRenderGraphConnectionPoint.IsShadowGenerator(shadowGeneratorsConnectedPoint.value)) {\r\n this._frameGraphTask.shadowGenerators[0] = shadowGeneratorsConnectedPoint.value as FrameGraphShadowGeneratorTask;\r\n }\r\n }\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.depthTest = ${this.depthTest};`);\r\n codes.push(`${this._codeVariableName}.depthWrite = ${this.depthWrite};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.depthTest = this.depthTest;\r\n serializationObject.depthWrite = this.depthWrite;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.depthTest = serializationObject.depthTest;\r\n this.depthWrite = serializationObject.depthWrite;\r\n }\r\n}\r\n"]}
|
|
@@ -4,12 +4,14 @@ export * from "./inputBlock";
|
|
|
4
4
|
export * from "./outputBlock";
|
|
5
5
|
export * from "./resourceContainerBlock";
|
|
6
6
|
export * from "./Layers/glowLayerBlock";
|
|
7
|
+
export * from "./Layers/highlightLayerBlock";
|
|
7
8
|
export * from "./PostProcesses/blackAndWhitePostProcessBlock";
|
|
8
9
|
export * from "./PostProcesses/bloomPostProcessBlock";
|
|
9
10
|
export * from "./PostProcesses/blurPostProcessBlock";
|
|
10
11
|
export * from "./PostProcesses/circleOfConfusionPostProcessBlock";
|
|
11
12
|
export * from "./PostProcesses/depthOfFieldPostProcessBlock";
|
|
12
13
|
export * from "./PostProcesses/extractHighlightsPostProcessBlock";
|
|
14
|
+
export * from "./PostProcesses/passPostProcessBlock";
|
|
13
15
|
export * from "./Rendering/csmShadowGeneratorBlock";
|
|
14
16
|
export * from "./Rendering/cullObjectsBlock";
|
|
15
17
|
export * from "./Rendering/geometryRendererBlock";
|
|
@@ -4,12 +4,14 @@ export * from "./inputBlock.js";
|
|
|
4
4
|
export * from "./outputBlock.js";
|
|
5
5
|
export * from "./resourceContainerBlock.js";
|
|
6
6
|
export * from "./Layers/glowLayerBlock.js";
|
|
7
|
+
export * from "./Layers/highlightLayerBlock.js";
|
|
7
8
|
export * from "./PostProcesses/blackAndWhitePostProcessBlock.js";
|
|
8
9
|
export * from "./PostProcesses/bloomPostProcessBlock.js";
|
|
9
10
|
export * from "./PostProcesses/blurPostProcessBlock.js";
|
|
10
11
|
export * from "./PostProcesses/circleOfConfusionPostProcessBlock.js";
|
|
11
12
|
export * from "./PostProcesses/depthOfFieldPostProcessBlock.js";
|
|
12
13
|
export * from "./PostProcesses/extractHighlightsPostProcessBlock.js";
|
|
14
|
+
export * from "./PostProcesses/passPostProcessBlock.js";
|
|
13
15
|
export * from "./Rendering/csmShadowGeneratorBlock.js";
|
|
14
16
|
export * from "./Rendering/cullObjectsBlock.js";
|
|
15
17
|
export * from "./Rendering/geometryRendererBlock.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,mDAAmD,CAAC;AAClE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AAErD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from \"./elbowBlock\";\r\nexport * from \"./executeBlock\";\r\nexport * from \"./inputBlock\";\r\nexport * from \"./outputBlock\";\r\nexport * from \"./resourceContainerBlock\";\r\n\r\nexport * from \"./Layers/glowLayerBlock\";\r\nexport * from \"./Layers/highlightLayerBlock\";\r\n\r\nexport * from \"./PostProcesses/blackAndWhitePostProcessBlock\";\r\nexport * from \"./PostProcesses/bloomPostProcessBlock\";\r\nexport * from \"./PostProcesses/blurPostProcessBlock\";\r\nexport * from \"./PostProcesses/circleOfConfusionPostProcessBlock\";\r\nexport * from \"./PostProcesses/depthOfFieldPostProcessBlock\";\r\nexport * from \"./PostProcesses/extractHighlightsPostProcessBlock\";\r\nexport * from \"./PostProcesses/passPostProcessBlock\";\r\n\r\nexport * from \"./Rendering/csmShadowGeneratorBlock\";\r\nexport * from \"./Rendering/cullObjectsBlock\";\r\nexport * from \"./Rendering/geometryRendererBlock\";\r\nexport * from \"./Rendering/objectRendererBlock\";\r\nexport * from \"./Rendering/shadowGeneratorBlock\";\r\nexport * from \"./Rendering/taaObjectRendererBlock\";\r\n\r\nexport * from \"./Teleport/teleportInBlock\";\r\nexport * from \"./Teleport/teleportOutBlock\";\r\n\r\nexport * from \"./Textures/clearBlock\";\r\nexport * from \"./Textures/copyTextureBlock\";\r\nexport * from \"./Textures/generateMipmapsBlock\";\r\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Color4, Scene, FrameGraphTextureHandle, Camera, FrameGraphObjectList, IShadowLight, FrameGraphShadowGeneratorTask } from "../../../index.js";
|
|
1
|
+
import type { Color4, Scene, FrameGraphTextureHandle, Camera, FrameGraphObjectList, IShadowLight, FrameGraphShadowGeneratorTask, FrameGraphObjectRendererTask } from "../../../index.js";
|
|
2
2
|
/**
|
|
3
3
|
* Interface used to configure the node render graph editor
|
|
4
4
|
*/
|
|
@@ -84,6 +84,8 @@ export declare enum NodeRenderGraphBlockConnectionPointTypes {
|
|
|
84
84
|
BasedOnInput = 536870912,
|
|
85
85
|
/** Undefined */
|
|
86
86
|
Undefined = 1073741824,
|
|
87
|
+
/** Custom object */
|
|
88
|
+
Object = 2147483648,
|
|
87
89
|
/** Bitmask of all types */
|
|
88
90
|
All = 4294967295
|
|
89
91
|
}
|
|
@@ -110,4 +112,4 @@ export declare enum NodeRenderGraphConnectionPointDirection {
|
|
|
110
112
|
/**
|
|
111
113
|
* Defines the type of a connection point value
|
|
112
114
|
*/
|
|
113
|
-
export type NodeRenderGraphBlockConnectionPointValueType = FrameGraphTextureHandle | Camera | FrameGraphObjectList | IShadowLight | FrameGraphShadowGeneratorTask;
|
|
115
|
+
export type NodeRenderGraphBlockConnectionPointValueType = FrameGraphTextureHandle | Camera | FrameGraphObjectList | IShadowLight | FrameGraphShadowGeneratorTask | FrameGraphObjectRendererTask;
|
|
@@ -57,6 +57,8 @@ export var NodeRenderGraphBlockConnectionPointTypes;
|
|
|
57
57
|
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["BasedOnInput"] = 536870912] = "BasedOnInput";
|
|
58
58
|
/** Undefined */
|
|
59
59
|
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["Undefined"] = 1073741824] = "Undefined";
|
|
60
|
+
/** Custom object */
|
|
61
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["Object"] = 2147483648] = "Object";
|
|
60
62
|
/** Bitmask of all types */
|
|
61
63
|
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["All"] = 4294967295] = "All";
|
|
62
64
|
})(NodeRenderGraphBlockConnectionPointTypes || (NodeRenderGraphBlockConnectionPointTypes = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeRenderGraphTypes.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Types/nodeRenderGraphTypes.ts"],"names":[],"mappings":"AAgCA;;GAEG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"nodeRenderGraphTypes.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Types/nodeRenderGraphTypes.ts"],"names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IAC/D,6BAA6B;IAC7B,qIAAU,CAAA;IACV,qDAAqD;IACrD,iJAAgB,CAAA;IAChB,sEAAsE;IACtE,6IAAc,CAAA;AAClB,CAAC,EAPiB,iDAAiD,KAAjD,iDAAiD,QAOlE;AAED;;GAEG;AACH,MAAM,CAAN,IAAkB,uCAKjB;AALD,WAAkB,uCAAuC;IACrD,YAAY;IACZ,uGAAK,CAAA;IACL,aAAa;IACb,yGAAM,CAAA;AACV,CAAC,EALiB,uCAAuC,KAAvC,uCAAuC,QAKxD","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Color4, Scene, FrameGraphTextureHandle, Camera, FrameGraphObjectList, IShadowLight, FrameGraphShadowGeneratorTask, FrameGraphObjectRendererTask } from \"core/index\";\r\n\r\n/**\r\n * Interface used to configure the node render graph editor\r\n */\r\nexport interface INodeRenderGraphEditorOptions {\r\n /** Define the URL to load node editor script from */\r\n editorURL?: string;\r\n /** Additional configuration for the FGE */\r\n nodeRenderGraphEditorConfig?: {\r\n backgroundColor?: Color4;\r\n hostScene?: Scene;\r\n };\r\n}\r\n\r\n/**\r\n * Options that can be passed to the node render graph build method\r\n */\r\nexport interface INodeRenderGraphCreateOptions {\r\n /** If true, textures created by the node render graph will be visible in the inspector, for easier debugging (default: false) */\r\n debugTextures?: boolean;\r\n /** Rebuild the node render graph when the screen is resized (default: true) */\r\n rebuildGraphOnEngineResize?: boolean;\r\n /** Defines if the build should log activity (default: false) */\r\n verbose?: boolean;\r\n /** Defines if the autoConfigure method should be called when initializing blocks (default: false) */\r\n autoConfigure?: boolean;\r\n /** If true, external inputs like object lists and cameras will be filled with default values, taken from the scene. Note that external textures are not concerned (default: true). */\r\n autoFillExternalInputs?: boolean;\r\n}\r\n\r\n/**\r\n * Defines the kind of connection point for node render graph nodes\r\n */\r\nexport enum NodeRenderGraphBlockConnectionPointTypes {\r\n /** General purpose texture */\r\n Texture = 0x00000001,\r\n /** Back buffer color texture */\r\n TextureBackBuffer = 0x00000002,\r\n /** Back buffer depth/stencil attachment */\r\n TextureBackBufferDepthStencilAttachment = 0x00000004,\r\n /** Depth/stencil attachment */\r\n TextureDepthStencilAttachment = 0x00000008,\r\n /** Depth (in view space) geometry texture */\r\n TextureViewDepth = 0x00000010,\r\n /** Normal (in view space) geometry texture */\r\n TextureViewNormal = 0x00000020,\r\n /** Albedo geometry texture */\r\n TextureAlbedo = 0x00000040,\r\n /** Reflectivity geometry texture */\r\n TextureReflectivity = 0x00000080,\r\n /** Position (in world space) geometry texture */\r\n TextureWorldPosition = 0x00000100,\r\n /** Velocity geometry texture */\r\n TextureVelocity = 0x00000200,\r\n /** Irradiance geometry texture */\r\n TextureIrradiance = 0x00000400,\r\n /** Albedo (sqrt) geometry texture */\r\n TextureAlbedoSqrt = 0x00000800,\r\n /** Depth (in screen space) geometry texture */\r\n TextureScreenDepth = 0x00001000,\r\n /** Normal (in world space) geometry texture */\r\n TextureWorldNormal = 0x00002000,\r\n /** Position (in local space) geometry texture */\r\n TextureLocalPosition = 0x00004000,\r\n /** Linear velocity geometry texture */\r\n TextureLinearVelocity = 0x00008000,\r\n\r\n /** Bit field for all textures but back buffer depth/stencil */\r\n TextureAllButBackBufferDepthStencil = 0x000ffffb,\r\n /** Bit field for all textures but back buffer color and depth/stencil */\r\n TextureAllButBackBuffer = 0x000ffff9,\r\n /** Bit field for all textures */\r\n TextureAll = 0x000fffff,\r\n\r\n /** Resource container */\r\n ResourceContainer = 0x00100000,\r\n /** Shadow generator */\r\n ShadowGenerator = 0x00200000,\r\n /** Light */\r\n ShadowLight = 0x00400000,\r\n /** Camera */\r\n Camera = 0x01000000,\r\n /** List of objects (meshes, particle systems, sprites) */\r\n ObjectList = 0x02000000,\r\n\r\n /** Detect type based on connection */\r\n AutoDetect = 0x10000000,\r\n /** Output type that will be defined by input type */\r\n BasedOnInput = 0x20000000,\r\n /** Undefined */\r\n Undefined = 0x40000000,\r\n /** Custom object */\r\n Object = 0x80000000,\r\n /** Bitmask of all types */\r\n All = 0xffffffff,\r\n}\r\n\r\n/**\r\n * Enum used to define the compatibility state between two connection points\r\n */\r\nexport const enum NodeRenderGraphConnectionPointCompatibilityStates {\r\n /** Points are compatibles */\r\n Compatible,\r\n /** Points are incompatible because of their types */\r\n TypeIncompatible,\r\n /** Points are incompatible because they are in the same hierarchy **/\r\n HierarchyIssue,\r\n}\r\n\r\n/**\r\n * Defines the direction of a connection point\r\n */\r\nexport const enum NodeRenderGraphConnectionPointDirection {\r\n /** Input */\r\n Input,\r\n /** Output */\r\n Output,\r\n}\r\n\r\n/**\r\n * Defines the type of a connection point value\r\n */\r\nexport type NodeRenderGraphBlockConnectionPointValueType =\r\n | FrameGraphTextureHandle\r\n | Camera\r\n | FrameGraphObjectList\r\n | IShadowLight\r\n | FrameGraphShadowGeneratorTask\r\n | FrameGraphObjectRendererTask;\r\n"]}
|
|
@@ -115,10 +115,11 @@ export declare class NodeRenderGraph {
|
|
|
115
115
|
/**
|
|
116
116
|
* Returns a promise that resolves when the node render graph is ready to be executed
|
|
117
117
|
* This method must be called after the graph has been built (NodeRenderGraph.build called)!
|
|
118
|
-
* @param
|
|
118
|
+
* @param timeStep Time step in ms between retries (default is 16)
|
|
119
|
+
* @param maxTimeout Maximum time in ms to wait for the graph to be ready (default is 30000)
|
|
119
120
|
* @returns The promise that resolves when the graph is ready
|
|
120
121
|
*/
|
|
121
|
-
whenReadyAsync(
|
|
122
|
+
whenReadyAsync(timeStep?: number, maxTimeout?: number): Promise<void>;
|
|
122
123
|
/**
|
|
123
124
|
* Execute the graph (the graph must have been built before!)
|
|
124
125
|
*/
|
|
@@ -257,11 +257,12 @@ export class NodeRenderGraph {
|
|
|
257
257
|
/**
|
|
258
258
|
* Returns a promise that resolves when the node render graph is ready to be executed
|
|
259
259
|
* This method must be called after the graph has been built (NodeRenderGraph.build called)!
|
|
260
|
-
* @param
|
|
260
|
+
* @param timeStep Time step in ms between retries (default is 16)
|
|
261
|
+
* @param maxTimeout Maximum time in ms to wait for the graph to be ready (default is 30000)
|
|
261
262
|
* @returns The promise that resolves when the graph is ready
|
|
262
263
|
*/
|
|
263
|
-
whenReadyAsync(
|
|
264
|
-
return this._frameGraph.whenReadyAsync(
|
|
264
|
+
whenReadyAsync(timeStep = 16, maxTimeout = 30000) {
|
|
265
|
+
return this._frameGraph.whenReadyAsync(timeStep, maxTimeout);
|
|
265
266
|
}
|
|
266
267
|
/**
|
|
267
268
|
* Execute the graph (the graph must have been built before!)
|