@babylonjs/core 7.31.2 → 7.32.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/Behaviors/Cameras/autoRotationBehavior.js +1 -0
- package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
- package/Cameras/camera.d.ts +5 -2
- package/Cameras/camera.js +1 -0
- package/Cameras/camera.js.map +1 -1
- package/Decorators/nodeDecorator.d.ts +9 -1
- package/Decorators/nodeDecorator.js +8 -0
- package/Decorators/nodeDecorator.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.js +40 -53
- package/Engines/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/Extensions/engine.renderTarget.js +20 -8
- package/Engines/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.debugging.js +16 -7
- package/Engines/WebGPU/Extensions/engine.debugging.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.js +43 -44
- package/Engines/WebGPU/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTarget.js +8 -6
- package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/WebGPU/webgpuHardwareTexture.d.ts +3 -3
- package/Engines/WebGPU/webgpuHardwareTexture.js +12 -9
- package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.js +25 -19
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -1
- package/Engines/WebGPU/webgpuTextureManager.js +5 -3
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/abstractEngine.d.ts +6 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/constants.d.ts +6 -1
- package/Engines/constants.js +6 -1
- package/Engines/constants.js.map +1 -1
- package/Engines/renderTargetWrapper.d.ts +7 -0
- package/Engines/renderTargetWrapper.js +15 -0
- package/Engines/renderTargetWrapper.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +3 -1
- package/Engines/webgpuEngine.js +9 -8
- package/Engines/webgpuEngine.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.d.ts +47 -0
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js +113 -0
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.d.ts +62 -0
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js +171 -0
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.d.ts +51 -0
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js +127 -0
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.d.ts +67 -0
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js +187 -0
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.d.ts +77 -0
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js +232 -0
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.d.ts +47 -0
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js +113 -0
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.d.ts +41 -0
- package/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.js +79 -0
- package/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.d.ts +119 -0
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +451 -0
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.d.ts +63 -0
- package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js +154 -0
- package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Teleport/teleportInBlock.d.ts +59 -0
- package/FrameGraph/Node/Blocks/Teleport/teleportInBlock.js +131 -0
- package/FrameGraph/Node/Blocks/Teleport/teleportInBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Teleport/teleportOutBlock.d.ts +49 -0
- package/FrameGraph/Node/Blocks/Teleport/teleportOutBlock.js +107 -0
- package/FrameGraph/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/clearBlock.d.ts +50 -0
- package/FrameGraph/Node/Blocks/Textures/clearBlock.js +125 -0
- package/FrameGraph/Node/Blocks/Textures/clearBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.d.ts +38 -0
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js +71 -0
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.d.ts +34 -0
- package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js +59 -0
- package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/elbowBlock.d.ts +28 -0
- package/FrameGraph/Node/Blocks/elbowBlock.js +47 -0
- package/FrameGraph/Node/Blocks/elbowBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/index.d.ts +17 -0
- package/FrameGraph/Node/Blocks/index.js +18 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -0
- package/FrameGraph/Node/Blocks/inputBlock.d.ts +94 -0
- package/FrameGraph/Node/Blocks/inputBlock.js +270 -0
- package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/outputBlock.d.ts +30 -0
- package/FrameGraph/Node/Blocks/outputBlock.js +51 -0
- package/FrameGraph/Node/Blocks/outputBlock.js.map +1 -0
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.d.ts +110 -0
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.js +78 -0
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.js.map +1 -0
- package/FrameGraph/Node/nodeRenderGraph.d.ts +196 -0
- package/FrameGraph/Node/nodeRenderGraph.js +614 -0
- package/FrameGraph/Node/nodeRenderGraph.js.map +1 -0
- package/FrameGraph/Node/nodeRenderGraphBlock.d.ts +190 -0
- package/FrameGraph/Node/nodeRenderGraphBlock.js +495 -0
- package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -0
- package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.d.ts +143 -0
- package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js +275 -0
- package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js.map +1 -0
- package/FrameGraph/Node/nodeRenderGraphBuildState.d.ts +21 -0
- package/FrameGraph/Node/nodeRenderGraphBuildState.js +35 -0
- package/FrameGraph/Node/nodeRenderGraphBuildState.js.map +1 -0
- package/FrameGraph/Passes/cullPass.d.ts +28 -0
- package/FrameGraph/Passes/cullPass.js +38 -0
- package/FrameGraph/Passes/cullPass.js.map +1 -0
- package/FrameGraph/Passes/pass.d.ts +14 -0
- package/FrameGraph/Passes/pass.js +20 -0
- package/FrameGraph/Passes/pass.js.map +1 -0
- package/FrameGraph/Passes/renderPass.d.ts +49 -0
- package/FrameGraph/Passes/renderPass.js +72 -0
- package/FrameGraph/Passes/renderPass.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.d.ts +16 -0
- package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.js +17 -0
- package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.d.ts +12 -0
- package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js +21 -0
- package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/bloomTask.d.ts +54 -0
- package/FrameGraph/Tasks/PostProcesses/bloomTask.js +114 -0
- package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/blurTask.d.ts +17 -0
- package/FrameGraph/Tasks/PostProcesses/blurTask.js +24 -0
- package/FrameGraph/Tasks/PostProcesses/blurTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.d.ts +30 -0
- package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js +35 -0
- package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.d.ts +12 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js +26 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.d.ts +12 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js +29 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.d.ts +65 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js +134 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.d.ts +16 -0
- package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.js +17 -0
- package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.d.ts +41 -0
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +64 -0
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/cullObjectsTask.d.ts +28 -0
- package/FrameGraph/Tasks/Rendering/cullObjectsTask.js +52 -0
- package/FrameGraph/Tasks/Rendering/cullObjectsTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +145 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +259 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +66 -0
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js +127 -0
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -0
- package/FrameGraph/Tasks/Texture/clearTextureTask.d.ts +34 -0
- package/FrameGraph/Tasks/Texture/clearTextureTask.js +42 -0
- package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -0
- package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.d.ts +12 -0
- package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.js +23 -0
- package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.js.map +1 -0
- package/FrameGraph/Tasks/Texture/copyToTextureTask.d.ts +26 -0
- package/FrameGraph/Tasks/Texture/copyToTextureTask.js +31 -0
- package/FrameGraph/Tasks/Texture/copyToTextureTask.js.map +1 -0
- package/FrameGraph/Tasks/Texture/generateMipMapsTask.d.ts +22 -0
- package/FrameGraph/Tasks/Texture/generateMipMapsTask.js +34 -0
- package/FrameGraph/Tasks/Texture/generateMipMapsTask.js.map +1 -0
- package/FrameGraph/frameGraph.d.ts +143 -0
- package/FrameGraph/frameGraph.js +275 -0
- package/FrameGraph/frameGraph.js.map +1 -0
- package/FrameGraph/frameGraphContext.d.ts +5 -0
- package/FrameGraph/frameGraphContext.js +6 -0
- package/FrameGraph/frameGraphContext.js.map +1 -0
- package/FrameGraph/frameGraphObjectList.d.ts +15 -0
- package/FrameGraph/frameGraphObjectList.js +7 -0
- package/FrameGraph/frameGraphObjectList.js.map +1 -0
- package/FrameGraph/frameGraphRenderContext.d.ts +110 -0
- package/FrameGraph/frameGraphRenderContext.js +237 -0
- package/FrameGraph/frameGraphRenderContext.js.map +1 -0
- package/FrameGraph/frameGraphTask.d.ts +49 -0
- package/FrameGraph/frameGraphTask.js +117 -0
- package/FrameGraph/frameGraphTask.js.map +1 -0
- package/FrameGraph/frameGraphTextureManager.d.ts +50 -0
- package/FrameGraph/frameGraphTextureManager.js +277 -0
- package/FrameGraph/frameGraphTextureManager.js.map +1 -0
- package/FrameGraph/frameGraphTypes.d.ts +59 -0
- package/FrameGraph/frameGraphTypes.js +9 -0
- package/FrameGraph/frameGraphTypes.js.map +1 -0
- package/FrameGraph/index.d.ts +28 -0
- package/FrameGraph/index.js +30 -0
- package/FrameGraph/index.js.map +1 -0
- package/Gamepads/gamepadSceneComponent.d.ts +0 -1
- package/Gamepads/gamepadSceneComponent.js +1 -7
- package/Gamepads/gamepadSceneComponent.js.map +1 -1
- package/Gizmos/boundingBoxGizmo.d.ts +7 -0
- package/Gizmos/boundingBoxGizmo.js +19 -6
- package/Gizmos/boundingBoxGizmo.js.map +1 -1
- package/Inputs/scene.inputManager.d.ts +3 -1
- package/Inputs/scene.inputManager.js +20 -8
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Layers/layer.d.ts +1 -1
- package/Layers/layer.js +1 -1
- package/Layers/layer.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +4 -0
- package/Materials/PBR/pbrBaseMaterial.js +8 -0
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/dynamicTexture.d.ts +32 -2
- package/Materials/Textures/dynamicTexture.js +13 -18
- package/Materials/Textures/dynamicTexture.js.map +1 -1
- package/Materials/Textures/index.d.ts +1 -0
- package/Materials/Textures/index.js +1 -0
- package/Materials/Textures/index.js.map +1 -1
- package/Materials/Textures/mirrorTexture.js +0 -6
- package/Materials/Textures/mirrorTexture.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.d.ts +20 -8
- package/Materials/Textures/multiRenderTarget.js +2 -0
- package/Materials/Textures/multiRenderTarget.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.d.ts +8 -1
- package/Materials/Textures/renderTargetTexture.js +28 -10
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Materials/Textures/textureCreationOptions.d.ts +20 -2
- package/Materials/Textures/textureCreationOptions.js +20 -1
- package/Materials/Textures/textureCreationOptions.js.map +1 -1
- package/Materials/effectRenderer.d.ts +132 -14
- package/Materials/effectRenderer.js +229 -33
- package/Materials/effectRenderer.js.map +1 -1
- package/Materials/index.d.ts +1 -0
- package/Materials/index.js +1 -0
- package/Materials/index.js.map +1 -1
- package/Materials/materialHelper.functions.js +2 -0
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/materialHelper.geometryrendering.d.ts +122 -0
- package/Materials/materialHelper.geometryrendering.js +259 -0
- package/Materials/materialHelper.geometryrendering.js.map +1 -0
- package/Materials/standardMaterial.d.ts +4 -0
- package/Materials/standardMaterial.js +8 -0
- package/Materials/standardMaterial.js.map +1 -1
- package/Maths/index.d.ts +1 -0
- package/Maths/index.js +1 -0
- package/Maths/index.js.map +1 -1
- package/Meshes/Builders/greasedLineBuilder.d.ts +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.d.ts +22 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.js +39 -0
- package/Meshes/Node/Blocks/geometryOptimizeBlock.js.map +1 -1
- package/Misc/copyTextureToTexture.d.ts +3 -2
- package/Misc/copyTextureToTexture.js +11 -5
- package/Misc/copyTextureToTexture.js.map +1 -1
- package/PostProcesses/blackAndWhitePostProcess.d.ts +5 -3
- package/PostProcesses/blackAndWhitePostProcess.js +24 -19
- package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
- package/PostProcesses/bloomEffect.d.ts +7 -5
- package/PostProcesses/bloomEffect.js +49 -23
- package/PostProcesses/bloomEffect.js.map +1 -1
- package/PostProcesses/bloomMergePostProcess.d.ts +5 -5
- package/PostProcesses/bloomMergePostProcess.js +28 -19
- package/PostProcesses/bloomMergePostProcess.js.map +1 -1
- package/PostProcesses/blurPostProcess.d.ts +7 -43
- package/PostProcesses/blurPostProcess.js +47 -185
- package/PostProcesses/blurPostProcess.js.map +1 -1
- package/PostProcesses/circleOfConfusionPostProcess.d.ts +13 -6
- package/PostProcesses/circleOfConfusionPostProcess.js +59 -38
- package/PostProcesses/circleOfConfusionPostProcess.js.map +1 -1
- package/PostProcesses/depthOfFieldBlurPostProcess.d.ts +2 -6
- package/PostProcesses/depthOfFieldBlurPostProcess.js +14 -11
- package/PostProcesses/depthOfFieldBlurPostProcess.js.map +1 -1
- package/PostProcesses/depthOfFieldEffect.d.ts +5 -2
- package/PostProcesses/depthOfFieldEffect.js +53 -45
- package/PostProcesses/depthOfFieldEffect.js.map +1 -1
- package/PostProcesses/depthOfFieldMergePostProcess.d.ts +0 -1
- package/PostProcesses/depthOfFieldMergePostProcess.js +18 -12
- package/PostProcesses/depthOfFieldMergePostProcess.js.map +1 -1
- package/PostProcesses/extractHighlightsPostProcess.d.ts +8 -4
- package/PostProcesses/extractHighlightsPostProcess.js +35 -22
- package/PostProcesses/extractHighlightsPostProcess.js.map +1 -1
- package/PostProcesses/index.d.ts +6 -0
- package/PostProcesses/index.js +6 -0
- package/PostProcesses/index.js.map +1 -1
- package/PostProcesses/postProcess.d.ts +15 -70
- package/PostProcesses/postProcess.js +80 -97
- package/PostProcesses/postProcess.js.map +1 -1
- package/PostProcesses/thinBlackAndWhitePostProcess.d.ts +28 -0
- package/PostProcesses/thinBlackAndWhitePostProcess.js +50 -0
- package/PostProcesses/thinBlackAndWhitePostProcess.js.map +1 -0
- package/PostProcesses/thinBloomEffect.d.ts +49 -0
- package/PostProcesses/thinBloomEffect.js +59 -0
- package/PostProcesses/thinBloomEffect.js.map +1 -0
- package/PostProcesses/thinBloomMergePostProcess.d.ts +15 -0
- package/PostProcesses/thinBloomMergePostProcess.js +38 -0
- package/PostProcesses/thinBloomMergePostProcess.js.map +1 -0
- package/PostProcesses/thinBlurPostProcess.d.ts +89 -0
- package/PostProcesses/thinBlurPostProcess.js +242 -0
- package/PostProcesses/thinBlurPostProcess.js.map +1 -0
- package/PostProcesses/thinCircleOfConfusionPostProcess.d.ts +62 -0
- package/PostProcesses/thinCircleOfConfusionPostProcess.js +81 -0
- package/PostProcesses/thinCircleOfConfusionPostProcess.js.map +1 -0
- package/PostProcesses/thinDepthOfFieldBlurPostProcess.d.ts +8 -0
- package/PostProcesses/thinDepthOfFieldBlurPostProcess.js +13 -0
- package/PostProcesses/thinDepthOfFieldBlurPostProcess.js.map +1 -0
- package/PostProcesses/thinDepthOfFieldEffect.d.ts +70 -0
- package/PostProcesses/thinDepthOfFieldEffect.js +115 -0
- package/PostProcesses/thinDepthOfFieldEffect.js.map +1 -0
- package/PostProcesses/thinDepthOfFieldMergePostProcess.d.ts +11 -0
- package/PostProcesses/thinDepthOfFieldMergePostProcess.js +30 -0
- package/PostProcesses/thinDepthOfFieldMergePostProcess.js.map +1 -0
- package/PostProcesses/thinExtractHighlightsPostProcess.d.ts +30 -0
- package/PostProcesses/thinExtractHighlightsPostProcess.js +55 -0
- package/PostProcesses/thinExtractHighlightsPostProcess.js.map +1 -0
- package/Rendering/depthPeelingRenderer.js +2 -2
- package/Rendering/depthPeelingRenderer.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.js +4 -4
- package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockPrePass.d.ts +5 -0
- package/Shaders/ShadersInclude/pbrBlockPrePass.js +75 -0
- package/Shaders/ShadersInclude/pbrBlockPrePass.js.map +1 -0
- package/Shaders/ShadersInclude/prePassVertex.js +1 -2
- package/Shaders/ShadersInclude/prePassVertex.js.map +1 -1
- package/Shaders/circleOfConfusion.fragment.js +9 -1
- package/Shaders/circleOfConfusion.fragment.js.map +1 -1
- package/Shaders/colorCorrection.fragment.js +1 -0
- package/Shaders/colorCorrection.fragment.js.map +1 -1
- package/Shaders/default.fragment.js +17 -25
- package/Shaders/default.fragment.js.map +1 -1
- package/Shaders/default.vertex.js +4 -6
- package/Shaders/default.vertex.js.map +1 -1
- package/Shaders/pbr.fragment.d.ts +1 -0
- package/Shaders/pbr.fragment.js +2 -74
- package/Shaders/pbr.fragment.js.map +1 -1
- package/Shaders/pbr.vertex.js +3 -3
- package/Shaders/pbr.vertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js +100 -0
- package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/prePassVertex.js +1 -2
- package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
- package/ShadersWGSL/background.vertex.js +1 -1
- package/ShadersWGSL/background.vertex.js.map +1 -1
- package/ShadersWGSL/circleOfConfusion.fragment.js +10 -2
- package/ShadersWGSL/circleOfConfusion.fragment.js.map +1 -1
- package/ShadersWGSL/default.fragment.js +20 -31
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/ShadersWGSL/default.vertex.js +4 -5
- package/ShadersWGSL/default.vertex.js.map +1 -1
- package/ShadersWGSL/glowMapGeneration.fragment.js +1 -1
- package/ShadersWGSL/glowMapGeneration.fragment.js.map +1 -1
- package/ShadersWGSL/glowMapGeneration.vertex.js +1 -1
- package/ShadersWGSL/glowMapGeneration.vertex.js.map +1 -1
- package/ShadersWGSL/pbr.fragment.d.ts +1 -0
- package/ShadersWGSL/pbr.fragment.js +2 -100
- package/ShadersWGSL/pbr.fragment.js.map +1 -1
- package/ShadersWGSL/pbr.vertex.js +4 -2
- package/ShadersWGSL/pbr.vertex.js.map +1 -1
- package/XR/features/WebXRRawCameraAccess.js +1 -1
- package/XR/features/WebXRRawCameraAccess.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +19 -2
- package/scene.js +110 -13
- package/scene.js.map +1 -1
- package/sceneComponent.d.ts +0 -1
- package/sceneComponent.js +0 -1
- package/sceneComponent.js.map +1 -1
- package/types.d.ts +12 -0
- package/types.js.map +1 -1
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { __decorate } from "../../../tslib.es6.js";
|
|
2
|
+
import { Observable } from "../../../Misc/observable.js";
|
|
3
|
+
import { NodeRenderGraphBlockConnectionPointTypes } from "../Types/nodeRenderGraphTypes.js";
|
|
4
|
+
import { NodeRenderGraphBlock } from "../nodeRenderGraphBlock.js";
|
|
5
|
+
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
6
|
+
import { editableInPropertyPage } from "../../../Decorators/nodeDecorator.js";
|
|
7
|
+
import { backbufferColorTextureHandle, backbufferDepthStencilTextureHandle } from "../../../FrameGraph/frameGraphTypes.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Block used to expose an input value
|
|
11
|
+
*/
|
|
12
|
+
export class NodeRenderGraphInputBlock extends NodeRenderGraphBlock {
|
|
13
|
+
/**
|
|
14
|
+
* Gets or sets the connection point type (default is Undefined)
|
|
15
|
+
*/
|
|
16
|
+
get type() {
|
|
17
|
+
return this._type;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new NodeRenderGraphInputBlock
|
|
21
|
+
* @param name defines the block name
|
|
22
|
+
* @param frameGraph defines the hosting frame graph
|
|
23
|
+
* @param scene defines the hosting scene
|
|
24
|
+
* @param type defines the type of the input (can be set to NodeRenderGraphBlockConnectionPointTypes.Undefined)
|
|
25
|
+
*/
|
|
26
|
+
constructor(name, frameGraph, scene, type = NodeRenderGraphBlockConnectionPointTypes.Undefined) {
|
|
27
|
+
super(name, frameGraph, scene);
|
|
28
|
+
this._storedValue = null;
|
|
29
|
+
this._type = NodeRenderGraphBlockConnectionPointTypes.Undefined;
|
|
30
|
+
/** Gets an observable raised when the value is changed */
|
|
31
|
+
this.onValueChangedObservable = new Observable();
|
|
32
|
+
/** Indicates that the input is externally managed */
|
|
33
|
+
this.isExternal = false;
|
|
34
|
+
this._type = type;
|
|
35
|
+
this._isInput = true;
|
|
36
|
+
this.registerOutput("output", type);
|
|
37
|
+
this.setDefaultValue();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Set the input block to its default value (based on its type)
|
|
41
|
+
*/
|
|
42
|
+
setDefaultValue() {
|
|
43
|
+
switch (this.type) {
|
|
44
|
+
case NodeRenderGraphBlockConnectionPointTypes.Texture:
|
|
45
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureViewDepth:
|
|
46
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureScreenDepth:
|
|
47
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureViewNormal:
|
|
48
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureWorldNormal:
|
|
49
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureAlbedo:
|
|
50
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureReflectivity:
|
|
51
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureLocalPosition:
|
|
52
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureWorldPosition:
|
|
53
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureVelocity:
|
|
54
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureLinearVelocity:
|
|
55
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureIrradiance:
|
|
56
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureAlbedoSqrt: {
|
|
57
|
+
const options = {
|
|
58
|
+
size: { width: 100, height: 100 },
|
|
59
|
+
options: {
|
|
60
|
+
createMipMaps: false,
|
|
61
|
+
generateMipMaps: false,
|
|
62
|
+
types: [0],
|
|
63
|
+
formats: [5],
|
|
64
|
+
samples: 1,
|
|
65
|
+
useSRGBBuffers: [false],
|
|
66
|
+
generateDepthBuffer: false,
|
|
67
|
+
},
|
|
68
|
+
sizeIsPercentage: true,
|
|
69
|
+
};
|
|
70
|
+
this.creationOptions = options;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
case NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment: {
|
|
74
|
+
const options = {
|
|
75
|
+
size: { width: 100, height: 100 },
|
|
76
|
+
options: {
|
|
77
|
+
createMipMaps: false,
|
|
78
|
+
generateMipMaps: false,
|
|
79
|
+
depthTextureFormat: 13,
|
|
80
|
+
textureCount: 0,
|
|
81
|
+
samples: 1,
|
|
82
|
+
generateDepthTexture: true,
|
|
83
|
+
generateDepthBuffer: true,
|
|
84
|
+
generateStencilBuffer: true,
|
|
85
|
+
},
|
|
86
|
+
sizeIsPercentage: true,
|
|
87
|
+
};
|
|
88
|
+
this.creationOptions = options;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case NodeRenderGraphBlockConnectionPointTypes.ObjectList:
|
|
92
|
+
this.value = { meshes: [], particleSystems: [] };
|
|
93
|
+
this.isExternal = true;
|
|
94
|
+
break;
|
|
95
|
+
case NodeRenderGraphBlockConnectionPointTypes.Camera:
|
|
96
|
+
this.value = this._scene.cameras[0];
|
|
97
|
+
this.isExternal = true;
|
|
98
|
+
break;
|
|
99
|
+
default:
|
|
100
|
+
this.isExternal = true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Gets or sets the value of that point.
|
|
105
|
+
*/
|
|
106
|
+
get value() {
|
|
107
|
+
return this._storedValue;
|
|
108
|
+
}
|
|
109
|
+
set value(value) {
|
|
110
|
+
this._storedValue = value;
|
|
111
|
+
this.output.value = undefined;
|
|
112
|
+
this.onValueChangedObservable.notifyObservers(this);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Gets the value as a specific type
|
|
116
|
+
* @returns the value as a specific type
|
|
117
|
+
*/
|
|
118
|
+
getTypedValue() {
|
|
119
|
+
return this._storedValue;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Gets the value as a render target wrapper
|
|
123
|
+
* @returns The value as a render target wrapper if it is a render target wrapper, otherwise undefined
|
|
124
|
+
*/
|
|
125
|
+
getValueAsRenderTargetWrapper() {
|
|
126
|
+
if (this._storedValue.shareDepth) {
|
|
127
|
+
return this._storedValue;
|
|
128
|
+
}
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Gets the value as a render target wrapper
|
|
133
|
+
* @returns The internal texture stored in value if value is a render target wrapper or a thin texture, otherwise null
|
|
134
|
+
*/
|
|
135
|
+
getInternalTextureFromValue() {
|
|
136
|
+
if (this._storedValue.shareDepth) {
|
|
137
|
+
return this._storedValue.texture;
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Gets the current class name
|
|
143
|
+
* @returns the class name
|
|
144
|
+
*/
|
|
145
|
+
getClassName() {
|
|
146
|
+
return "NodeRenderGraphInputBlock";
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Gets the output component
|
|
150
|
+
*/
|
|
151
|
+
get output() {
|
|
152
|
+
return this._outputs[0];
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Check if the block is a texture of any type
|
|
156
|
+
* @returns true if the block is a texture
|
|
157
|
+
*/
|
|
158
|
+
isAnyTexture() {
|
|
159
|
+
return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureAll) !== 0;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Gets a boolean indicating that the connection point is the back buffer texture
|
|
163
|
+
* @returns true if the connection point is the back buffer texture
|
|
164
|
+
*/
|
|
165
|
+
isBackBuffer() {
|
|
166
|
+
return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureBackBuffer) !== 0;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Gets a boolean indicating that the connection point is a depth/stencil attachment texture
|
|
170
|
+
* @returns true if the connection point is a depth/stencil attachment texture
|
|
171
|
+
*/
|
|
172
|
+
isBackBufferDepthStencilAttachment() {
|
|
173
|
+
return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment) !== 0;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Check if the block is a camera
|
|
177
|
+
* @returns true if the block is a camera
|
|
178
|
+
*/
|
|
179
|
+
isCamera() {
|
|
180
|
+
return (this.type & NodeRenderGraphBlockConnectionPointTypes.Camera) !== 0;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Check if the block is an object list
|
|
184
|
+
* @returns true if the block is an object list
|
|
185
|
+
*/
|
|
186
|
+
isObjectList() {
|
|
187
|
+
return (this.type & NodeRenderGraphBlockConnectionPointTypes.ObjectList) !== 0;
|
|
188
|
+
}
|
|
189
|
+
_buildBlock(state) {
|
|
190
|
+
super._buildBlock(state);
|
|
191
|
+
if (this.isExternal) {
|
|
192
|
+
if (this.isBackBuffer()) {
|
|
193
|
+
this.output.value = backbufferColorTextureHandle;
|
|
194
|
+
}
|
|
195
|
+
else if (this.isBackBufferDepthStencilAttachment()) {
|
|
196
|
+
this.output.value = backbufferDepthStencilTextureHandle;
|
|
197
|
+
}
|
|
198
|
+
else if (this.isCamera()) {
|
|
199
|
+
this.output.value = this.getTypedValue();
|
|
200
|
+
}
|
|
201
|
+
else if (this.isObjectList()) {
|
|
202
|
+
this.output.value = this.getTypedValue();
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
if (this._storedValue === undefined || this._storedValue === null) {
|
|
206
|
+
throw new Error(`NodeRenderGraphInputBlock: External input "${this.name}" is not set`);
|
|
207
|
+
}
|
|
208
|
+
const texture = this.getValueAsRenderTargetWrapper();
|
|
209
|
+
if (texture) {
|
|
210
|
+
this.output.value = this._frameGraph.importTexture(this.name, texture, this.output.value);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
if ((this.type & NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer) !== 0) {
|
|
216
|
+
const textureCreateOptions = this.creationOptions;
|
|
217
|
+
if (!textureCreateOptions) {
|
|
218
|
+
throw new Error(`NodeRenderGraphInputBlock: Creation options are missing for texture "${this.name}"`);
|
|
219
|
+
}
|
|
220
|
+
this.output.value = this._frameGraph.createRenderTargetTexture(this.name, textureCreateOptions);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
dispose() {
|
|
224
|
+
this._storedValue = null;
|
|
225
|
+
this.onValueChangedObservable.clear();
|
|
226
|
+
super.dispose();
|
|
227
|
+
}
|
|
228
|
+
_dumpPropertiesCode() {
|
|
229
|
+
const codes = [];
|
|
230
|
+
codes.push(`${this._codeVariableName}.isExternal = ${this.isExternal};`);
|
|
231
|
+
if (this.isAnyTexture()) {
|
|
232
|
+
if (!this.isExternal) {
|
|
233
|
+
codes.push(`${this._codeVariableName}.creationOptions = ${JSON.stringify(this.creationOptions)};`);
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
codes.push(`${this._codeVariableName}.value = EXTERNAL_TEXTURE; // TODO: set the external texture`);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
else if (this.isCamera()) {
|
|
240
|
+
codes.push(`${this._codeVariableName}.value = EXTERNAL_CAMERA; // TODO: set the external camera`);
|
|
241
|
+
}
|
|
242
|
+
else if (this.isObjectList()) {
|
|
243
|
+
codes.push(`${this._codeVariableName}.value = EXTERNAL_OBJECT_LIST; // TODO: set the external object list`);
|
|
244
|
+
}
|
|
245
|
+
return super._dumpPropertiesCode() + codes.join("\n");
|
|
246
|
+
}
|
|
247
|
+
serialize() {
|
|
248
|
+
const serializationObject = super.serialize();
|
|
249
|
+
serializationObject.type = this.type;
|
|
250
|
+
serializationObject.isExternal = this.isExternal;
|
|
251
|
+
if (this.creationOptions) {
|
|
252
|
+
serializationObject.creationOptions = this.creationOptions;
|
|
253
|
+
}
|
|
254
|
+
return serializationObject;
|
|
255
|
+
}
|
|
256
|
+
_deserialize(serializationObject) {
|
|
257
|
+
super._deserialize(serializationObject);
|
|
258
|
+
this._type = serializationObject.type;
|
|
259
|
+
this.output.type = this._type;
|
|
260
|
+
this.isExternal = serializationObject.isExternal;
|
|
261
|
+
if (serializationObject.creationOptions) {
|
|
262
|
+
this.creationOptions = serializationObject.creationOptions;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
__decorate([
|
|
267
|
+
editableInPropertyPage("Is external", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
|
|
268
|
+
], NodeRenderGraphInputBlock.prototype, "isExternal", void 0);
|
|
269
|
+
RegisterClass("BABYLON.NodeRenderGraphInputBlock", NodeRenderGraphInputBlock);
|
|
270
|
+
//# sourceMappingURL=inputBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/inputBlock.ts"],"names":[],"mappings":";AAcA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,wCAAwC,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;A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ADN,sBAAsB,CAAC,aAAa,0CAAkC,YAAY,CAAC;6DAC1D;AA8Q9B,aAAa,CAAC,mCAAmC,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport type {\r\n NodeRenderGraphConnectionPoint,\r\n Scene,\r\n FrameGraph,\r\n NodeRenderGraphBuildState,\r\n Camera,\r\n RenderTargetWrapper,\r\n InternalTexture,\r\n Nullable,\r\n FrameGraphTextureCreationOptions,\r\n FrameGraphTextureHandle,\r\n FrameGraphObjectList,\r\n} from \"core/index\";\r\nimport { Observable } from \"../../../Misc/observable\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../Types/nodeRenderGraphTypes\";\r\nimport { NodeRenderGraphBlock } from \"../nodeRenderGraphBlock\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../Decorators/nodeDecorator\";\r\nimport { backbufferColorTextureHandle, backbufferDepthStencilTextureHandle } from \"../../../FrameGraph/frameGraphTypes\";\r\nimport { Constants } from \"../../../Engines/constants\";\r\n\r\nexport type NodeRenderGraphValueType = RenderTargetWrapper | Camera | FrameGraphObjectList;\r\n\r\nexport type NodeRenderGraphInputCreationOptions = FrameGraphTextureCreationOptions;\r\n\r\n/**\r\n * Block used to expose an input value\r\n */\r\nexport class NodeRenderGraphInputBlock extends NodeRenderGraphBlock {\r\n private _storedValue: Nullable<NodeRenderGraphValueType> = null;\r\n private _type: NodeRenderGraphBlockConnectionPointTypes = NodeRenderGraphBlockConnectionPointTypes.Undefined;\r\n\r\n /** Gets an observable raised when the value is changed */\r\n public onValueChangedObservable = new Observable<NodeRenderGraphInputBlock>();\r\n\r\n /** Indicates that the input is externally managed */\r\n @editableInPropertyPage(\"Is external\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public isExternal = false;\r\n\r\n /** Gets or sets the options to create the input value */\r\n public creationOptions: NodeRenderGraphInputCreationOptions;\r\n\r\n /**\r\n * Gets or sets the connection point type (default is Undefined)\r\n */\r\n public get type(): NodeRenderGraphBlockConnectionPointTypes {\r\n return this._type;\r\n }\r\n\r\n /**\r\n * Creates a new NodeRenderGraphInputBlock\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 * @param type defines the type of the input (can be set to NodeRenderGraphBlockConnectionPointTypes.Undefined)\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene, type: NodeRenderGraphBlockConnectionPointTypes = NodeRenderGraphBlockConnectionPointTypes.Undefined) {\r\n super(name, frameGraph, scene);\r\n\r\n this._type = type;\r\n this._isInput = true;\r\n this.registerOutput(\"output\", type);\r\n this.setDefaultValue();\r\n }\r\n\r\n /**\r\n * Set the input block to its default value (based on its type)\r\n */\r\n public setDefaultValue() {\r\n switch (this.type) {\r\n case NodeRenderGraphBlockConnectionPointTypes.Texture:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureViewDepth:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureScreenDepth:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureViewNormal:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureWorldNormal:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureAlbedo:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureReflectivity:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureLocalPosition:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureWorldPosition:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureVelocity:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureLinearVelocity:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureIrradiance:\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureAlbedoSqrt: {\r\n const options: FrameGraphTextureCreationOptions = {\r\n size: { width: 100, height: 100 },\r\n options: {\r\n createMipMaps: false,\r\n generateMipMaps: false,\r\n types: [Constants.TEXTURETYPE_UNSIGNED_BYTE],\r\n formats: [Constants.TEXTUREFORMAT_RGBA],\r\n samples: 1,\r\n useSRGBBuffers: [false],\r\n generateDepthBuffer: false,\r\n },\r\n sizeIsPercentage: true,\r\n };\r\n this.creationOptions = options;\r\n break;\r\n }\r\n case NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment: {\r\n const options: FrameGraphTextureCreationOptions = {\r\n size: { width: 100, height: 100 },\r\n options: {\r\n createMipMaps: false,\r\n generateMipMaps: false,\r\n depthTextureFormat: Constants.TEXTUREFORMAT_DEPTH24_STENCIL8,\r\n textureCount: 0,\r\n samples: 1,\r\n generateDepthTexture: true,\r\n generateDepthBuffer: true,\r\n generateStencilBuffer: true,\r\n },\r\n sizeIsPercentage: true,\r\n };\r\n this.creationOptions = options;\r\n break;\r\n }\r\n case NodeRenderGraphBlockConnectionPointTypes.ObjectList:\r\n this.value = { meshes: [], particleSystems: [] };\r\n this.isExternal = true;\r\n break;\r\n case NodeRenderGraphBlockConnectionPointTypes.Camera:\r\n this.value = this._scene.cameras[0];\r\n this.isExternal = true;\r\n break;\r\n default:\r\n this.isExternal = true;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets the value of that point.\r\n */\r\n public get value(): Nullable<NodeRenderGraphValueType> {\r\n return this._storedValue;\r\n }\r\n\r\n public set value(value: Nullable<NodeRenderGraphValueType>) {\r\n this._storedValue = value;\r\n this.output.value = undefined;\r\n this.onValueChangedObservable.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets the value as a specific type\r\n * @returns the value as a specific type\r\n */\r\n public getTypedValue<T extends NodeRenderGraphValueType>(): T {\r\n return this._storedValue as T;\r\n }\r\n\r\n /**\r\n * Gets the value as a render target wrapper\r\n * @returns The value as a render target wrapper if it is a render target wrapper, otherwise undefined\r\n */\r\n public getValueAsRenderTargetWrapper(): Nullable<RenderTargetWrapper> {\r\n if ((this._storedValue as RenderTargetWrapper).shareDepth) {\r\n return this._storedValue as RenderTargetWrapper;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Gets the value as a render target wrapper\r\n * @returns The internal texture stored in value if value is a render target wrapper or a thin texture, otherwise null\r\n */\r\n public getInternalTextureFromValue(): Nullable<InternalTexture> {\r\n if ((this._storedValue as RenderTargetWrapper).shareDepth) {\r\n return (this._storedValue as RenderTargetWrapper).texture;\r\n }\r\n return null;\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 \"NodeRenderGraphInputBlock\";\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 * Check if the block is a texture of any type\r\n * @returns true if the block is a texture\r\n */\r\n public isAnyTexture(): boolean {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureAll) !== 0;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the connection point is the back buffer texture\r\n * @returns true if the connection point is the back buffer texture\r\n */\r\n public isBackBuffer() {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureBackBuffer) !== 0;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the connection point is a depth/stencil attachment texture\r\n * @returns true if the connection point is a depth/stencil attachment texture\r\n */\r\n public isBackBufferDepthStencilAttachment() {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.TextureBackBufferDepthStencilAttachment) !== 0;\r\n }\r\n\r\n /**\r\n * Check if the block is a camera\r\n * @returns true if the block is a camera\r\n */\r\n public isCamera(): boolean {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.Camera) !== 0;\r\n }\r\n\r\n /**\r\n * Check if the block is an object list\r\n * @returns true if the block is an object list\r\n */\r\n public isObjectList(): boolean {\r\n return (this.type & NodeRenderGraphBlockConnectionPointTypes.ObjectList) !== 0;\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (this.isExternal) {\r\n if (this.isBackBuffer()) {\r\n this.output.value = backbufferColorTextureHandle;\r\n } else if (this.isBackBufferDepthStencilAttachment()) {\r\n this.output.value = backbufferDepthStencilTextureHandle;\r\n } else if (this.isCamera()) {\r\n this.output.value = this.getTypedValue<Camera>();\r\n } else if (this.isObjectList()) {\r\n this.output.value = this.getTypedValue<FrameGraphObjectList>();\r\n } else {\r\n if (this._storedValue === undefined || this._storedValue === null) {\r\n throw new Error(`NodeRenderGraphInputBlock: External input \"${this.name}\" is not set`);\r\n }\r\n const texture = this.getValueAsRenderTargetWrapper();\r\n if (texture) {\r\n this.output.value = this._frameGraph.importTexture(this.name, texture, this.output.value as FrameGraphTextureHandle);\r\n }\r\n }\r\n return;\r\n }\r\n\r\n if ((this.type & NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer) !== 0) {\r\n const textureCreateOptions = this.creationOptions as FrameGraphTextureCreationOptions;\r\n\r\n if (!textureCreateOptions) {\r\n throw new Error(`NodeRenderGraphInputBlock: Creation options are missing for texture \"${this.name}\"`);\r\n }\r\n\r\n this.output.value = this._frameGraph.createRenderTargetTexture(this.name, textureCreateOptions);\r\n }\r\n }\r\n\r\n public override dispose() {\r\n this._storedValue = null;\r\n this.onValueChangedObservable.clear();\r\n super.dispose();\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.isExternal = ${this.isExternal};`);\r\n if (this.isAnyTexture()) {\r\n if (!this.isExternal) {\r\n codes.push(`${this._codeVariableName}.creationOptions = ${JSON.stringify(this.creationOptions)};`);\r\n } else {\r\n codes.push(`${this._codeVariableName}.value = EXTERNAL_TEXTURE; // TODO: set the external texture`);\r\n }\r\n } else if (this.isCamera()) {\r\n codes.push(`${this._codeVariableName}.value = EXTERNAL_CAMERA; // TODO: set the external camera`);\r\n } else if (this.isObjectList()) {\r\n codes.push(`${this._codeVariableName}.value = EXTERNAL_OBJECT_LIST; // TODO: set the external object list`);\r\n }\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.type = this.type;\r\n serializationObject.isExternal = this.isExternal;\r\n if (this.creationOptions) {\r\n serializationObject.creationOptions = this.creationOptions;\r\n }\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this._type = serializationObject.type;\r\n this.output.type = this._type;\r\n this.isExternal = serializationObject.isExternal;\r\n if (serializationObject.creationOptions) {\r\n this.creationOptions = serializationObject.creationOptions;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphInputBlock\", NodeRenderGraphInputBlock);\r\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { NodeRenderGraphConnectionPoint, Scene, FrameGraph, NodeRenderGraphBuildState } from "../../../index.js";
|
|
2
|
+
import { NodeRenderGraphBlock } from "../nodeRenderGraphBlock";
|
|
3
|
+
import { FrameGraphCopyToBackbufferColorTask } from "../../Tasks/Texture/copyToBackbufferColorTask";
|
|
4
|
+
/**
|
|
5
|
+
* Block used to generate the final graph
|
|
6
|
+
*/
|
|
7
|
+
export declare class NodeRenderGraphOutputBlock extends NodeRenderGraphBlock {
|
|
8
|
+
protected _frameGraphTask: FrameGraphCopyToBackbufferColorTask;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the frame graph task associated with this block
|
|
11
|
+
*/
|
|
12
|
+
get task(): FrameGraphCopyToBackbufferColorTask;
|
|
13
|
+
/**
|
|
14
|
+
* Create a new NodeRenderGraphOutputBlock
|
|
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
|
+
* Gets the texture input component
|
|
27
|
+
*/
|
|
28
|
+
get texture(): NodeRenderGraphConnectionPoint;
|
|
29
|
+
protected _buildBlock(state: NodeRenderGraphBuildState): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { NodeRenderGraphBlock } from "../nodeRenderGraphBlock.js";
|
|
2
|
+
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
3
|
+
import { NodeRenderGraphBlockConnectionPointTypes } from "../Types/nodeRenderGraphTypes.js";
|
|
4
|
+
import { FrameGraphCopyToBackbufferColorTask } from "../../Tasks/Texture/copyToBackbufferColorTask.js";
|
|
5
|
+
/**
|
|
6
|
+
* Block used to generate the final graph
|
|
7
|
+
*/
|
|
8
|
+
export class NodeRenderGraphOutputBlock extends NodeRenderGraphBlock {
|
|
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 NodeRenderGraphOutputBlock
|
|
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._isUnique = true;
|
|
24
|
+
this.registerInput("texture", NodeRenderGraphBlockConnectionPointTypes.Texture);
|
|
25
|
+
this.texture.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAll);
|
|
26
|
+
this._frameGraphTask = new FrameGraphCopyToBackbufferColorTask(name, frameGraph);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Gets the current class name
|
|
30
|
+
* @returns the class name
|
|
31
|
+
*/
|
|
32
|
+
getClassName() {
|
|
33
|
+
return "NodeRenderGraphOutputBlock";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Gets the texture input component
|
|
37
|
+
*/
|
|
38
|
+
get texture() {
|
|
39
|
+
return this._inputs[0];
|
|
40
|
+
}
|
|
41
|
+
_buildBlock(state) {
|
|
42
|
+
super._buildBlock(state);
|
|
43
|
+
this._frameGraphTask.name = this.name;
|
|
44
|
+
const textureConnectedPoint = this.texture.connectedPoint;
|
|
45
|
+
if (textureConnectedPoint) {
|
|
46
|
+
this._frameGraphTask.sourceTexture = textureConnectedPoint.value;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
RegisterClass("BABYLON.NodeRenderGraphOutputBlock", NodeRenderGraphOutputBlock);
|
|
51
|
+
//# sourceMappingURL=outputBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/outputBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,wCAAwC,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,mCAAmC,EAAE,MAAM,+CAA+C,CAAC;AAEpG;;GAEG;AACH,MAAM,OAAO,0BAA2B,SAAQ,oBAAoB;IAGhE;;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,SAAS,GAAG,IAAI,CAAC;QAEtB,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,wCAAwC,CAAC,OAAO,CAAC,CAAC;QAEhF,IAAI,CAAC,OAAO,CAAC,+BAA+B,CAAC,wCAAwC,CAAC,UAAU,CAAC,CAAC;QAElG,IAAI,CAAC,eAAe,GAAG,IAAI,mCAAmC,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACrF,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,4BAA4B,CAAC;IACxC,CAAC;IACD;;OAEG;IACH,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAEkB,WAAW,CAAC,KAAgC;QAC3D,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAEzB,IAAI,CAAC,eAAe,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAEtC,MAAM,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;QAC1D,IAAI,qBAAqB,EAAE;YACvB,IAAI,CAAC,eAAe,CAAC,aAAa,GAAG,qBAAqB,CAAC,KAAgC,CAAC;SAC/F;IACL,CAAC;CACJ;AAED,aAAa,CAAC,oCAAoC,EAAE,0BAA0B,CAAC,CAAC","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { NodeRenderGraphConnectionPoint, Scene, FrameGraph, NodeRenderGraphBuildState, FrameGraphTextureHandle } from \"core/index\";\r\nimport { NodeRenderGraphBlock } from \"../nodeRenderGraphBlock\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../Types/nodeRenderGraphTypes\";\r\nimport { FrameGraphCopyToBackbufferColorTask } from \"../../Tasks/Texture/copyToBackbufferColorTask\";\r\n\r\n/**\r\n * Block used to generate the final graph\r\n */\r\nexport class NodeRenderGraphOutputBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphCopyToBackbufferColorTask;\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 NodeRenderGraphOutputBlock\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._isUnique = true;\r\n\r\n this.registerInput(\"texture\", NodeRenderGraphBlockConnectionPointTypes.Texture);\r\n\r\n this.texture.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAll);\r\n\r\n this._frameGraphTask = new FrameGraphCopyToBackbufferColorTask(name, frameGraph);\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 \"NodeRenderGraphOutputBlock\";\r\n }\r\n /**\r\n * Gets the texture input component\r\n */\r\n public get texture(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this._frameGraphTask.name = this.name;\r\n\r\n const textureConnectedPoint = this.texture.connectedPoint;\r\n if (textureConnectedPoint) {\r\n this._frameGraphTask.sourceTexture = textureConnectedPoint.value as FrameGraphTextureHandle;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphOutputBlock\", NodeRenderGraphOutputBlock);\r\n"]}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { Color4 } from "../../../Maths/math.color";
|
|
2
|
+
import type { Scene } from "../../../scene";
|
|
3
|
+
import type { FrameGraphTextureHandle } from "../../../FrameGraph/frameGraphTypes";
|
|
4
|
+
import type { Camera } from "../../../Cameras/camera";
|
|
5
|
+
import type { FrameGraphObjectList } from "../../frameGraphObjectList.js";
|
|
6
|
+
/**
|
|
7
|
+
* Interface used to configure the node render graph editor
|
|
8
|
+
*/
|
|
9
|
+
export interface INodeRenderGraphEditorOptions {
|
|
10
|
+
/** Define the URL to load node editor script from */
|
|
11
|
+
editorURL?: string;
|
|
12
|
+
/** Additional configuration for the FGE */
|
|
13
|
+
nodeRenderGraphEditorConfig?: {
|
|
14
|
+
backgroundColor?: Color4;
|
|
15
|
+
hostScene?: Scene;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Options that can be passed to the node render graph build method
|
|
20
|
+
*/
|
|
21
|
+
export interface INodeRenderGraphCreateOptions {
|
|
22
|
+
/** If true, textures created by the node render graph will be visible in the inspector, for easier debugging (default: false) */
|
|
23
|
+
debugTextures?: boolean;
|
|
24
|
+
/** Rebuild the node render graph when the screen is resized (default: true) */
|
|
25
|
+
rebuildGraphOnEngineResize?: boolean;
|
|
26
|
+
/** Defines if the build should log activity (default: false) */
|
|
27
|
+
verbose?: boolean;
|
|
28
|
+
/** Defines if the autoConfigure method should be called when initializing blocks (default: false) */
|
|
29
|
+
autoConfigure?: boolean;
|
|
30
|
+
/** 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). */
|
|
31
|
+
autoFillExternalInputs?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Defines the kind of connection point for node render graph nodes
|
|
35
|
+
*/
|
|
36
|
+
export declare enum NodeRenderGraphBlockConnectionPointTypes {
|
|
37
|
+
/** General purpose texture */
|
|
38
|
+
Texture = 1,
|
|
39
|
+
/** Back buffer color texture */
|
|
40
|
+
TextureBackBuffer = 2,
|
|
41
|
+
/** Back buffer depth/stencil attachment */
|
|
42
|
+
TextureBackBufferDepthStencilAttachment = 4,
|
|
43
|
+
/** Depth/stencil attachment */
|
|
44
|
+
TextureDepthStencilAttachment = 8,
|
|
45
|
+
/** Depth (in view space) geometry texture */
|
|
46
|
+
TextureViewDepth = 16,
|
|
47
|
+
/** Normal (in view space) geometry texture */
|
|
48
|
+
TextureViewNormal = 32,
|
|
49
|
+
/** Albedo geometry texture */
|
|
50
|
+
TextureAlbedo = 64,
|
|
51
|
+
/** Reflectivity geometry texture */
|
|
52
|
+
TextureReflectivity = 128,
|
|
53
|
+
/** Position (in world space) geometry texture */
|
|
54
|
+
TextureWorldPosition = 256,
|
|
55
|
+
/** Velocity geometry texture */
|
|
56
|
+
TextureVelocity = 512,
|
|
57
|
+
/** Irradiance geometry texture */
|
|
58
|
+
TextureIrradiance = 1024,
|
|
59
|
+
/** Albedo (sqrt) geometry texture */
|
|
60
|
+
TextureAlbedoSqrt = 2048,
|
|
61
|
+
/** Depth (in screen space) geometry texture */
|
|
62
|
+
TextureScreenDepth = 4096,
|
|
63
|
+
/** Normal (in world space) geometry texture */
|
|
64
|
+
TextureWorldNormal = 8192,
|
|
65
|
+
/** Position (in local space) geometry texture */
|
|
66
|
+
TextureLocalPosition = 16384,
|
|
67
|
+
/** Linear velocity geometry texture */
|
|
68
|
+
TextureLinearVelocity = 32768,
|
|
69
|
+
/** Bit field for all textures but back buffer depth/stencil */
|
|
70
|
+
TextureAllButBackBufferDepthStencil = 16777211,
|
|
71
|
+
/** Bit field for all textures but back buffer */
|
|
72
|
+
TextureAllButBackBuffer = 16777209,
|
|
73
|
+
TextureAll = 16777215,
|
|
74
|
+
/** Camera */
|
|
75
|
+
Camera = 16777216,
|
|
76
|
+
/** List of objects (meshes, particle systems, sprites) */
|
|
77
|
+
ObjectList = 33554432,
|
|
78
|
+
/** Detect type based on connection */
|
|
79
|
+
AutoDetect = 268435456,
|
|
80
|
+
/** Output type that will be defined by input type */
|
|
81
|
+
BasedOnInput = 536870912,
|
|
82
|
+
/** Undefined */
|
|
83
|
+
Undefined = 1073741824,
|
|
84
|
+
/** Bitmask of all types */
|
|
85
|
+
All = 4294967295
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Enum used to define the compatibility state between two connection points
|
|
89
|
+
*/
|
|
90
|
+
export declare enum NodeRenderGraphConnectionPointCompatibilityStates {
|
|
91
|
+
/** Points are compatibles */
|
|
92
|
+
Compatible = 0,
|
|
93
|
+
/** Points are incompatible because of their types */
|
|
94
|
+
TypeIncompatible = 1,
|
|
95
|
+
/** Points are incompatible because they are in the same hierarchy **/
|
|
96
|
+
HierarchyIssue = 2
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Defines the direction of a connection point
|
|
100
|
+
*/
|
|
101
|
+
export declare enum NodeRenderGraphConnectionPointDirection {
|
|
102
|
+
/** Input */
|
|
103
|
+
Input = 0,
|
|
104
|
+
/** Output */
|
|
105
|
+
Output = 1
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Defines the type of a connection point value
|
|
109
|
+
*/
|
|
110
|
+
export type NodeRenderGraphBlockConnectionPointValueType = FrameGraphTextureHandle | Camera | FrameGraphObjectList;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the kind of connection point for node render graph nodes
|
|
3
|
+
*/
|
|
4
|
+
export var NodeRenderGraphBlockConnectionPointTypes;
|
|
5
|
+
(function (NodeRenderGraphBlockConnectionPointTypes) {
|
|
6
|
+
/** General purpose texture */
|
|
7
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["Texture"] = 1] = "Texture";
|
|
8
|
+
/** Back buffer color texture */
|
|
9
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureBackBuffer"] = 2] = "TextureBackBuffer";
|
|
10
|
+
/** Back buffer depth/stencil attachment */
|
|
11
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureBackBufferDepthStencilAttachment"] = 4] = "TextureBackBufferDepthStencilAttachment";
|
|
12
|
+
/** Depth/stencil attachment */
|
|
13
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureDepthStencilAttachment"] = 8] = "TextureDepthStencilAttachment";
|
|
14
|
+
/** Depth (in view space) geometry texture */
|
|
15
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureViewDepth"] = 16] = "TextureViewDepth";
|
|
16
|
+
/** Normal (in view space) geometry texture */
|
|
17
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureViewNormal"] = 32] = "TextureViewNormal";
|
|
18
|
+
/** Albedo geometry texture */
|
|
19
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureAlbedo"] = 64] = "TextureAlbedo";
|
|
20
|
+
/** Reflectivity geometry texture */
|
|
21
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureReflectivity"] = 128] = "TextureReflectivity";
|
|
22
|
+
/** Position (in world space) geometry texture */
|
|
23
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureWorldPosition"] = 256] = "TextureWorldPosition";
|
|
24
|
+
/** Velocity geometry texture */
|
|
25
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureVelocity"] = 512] = "TextureVelocity";
|
|
26
|
+
/** Irradiance geometry texture */
|
|
27
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureIrradiance"] = 1024] = "TextureIrradiance";
|
|
28
|
+
/** Albedo (sqrt) geometry texture */
|
|
29
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureAlbedoSqrt"] = 2048] = "TextureAlbedoSqrt";
|
|
30
|
+
/** Depth (in screen space) geometry texture */
|
|
31
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureScreenDepth"] = 4096] = "TextureScreenDepth";
|
|
32
|
+
/** Normal (in world space) geometry texture */
|
|
33
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureWorldNormal"] = 8192] = "TextureWorldNormal";
|
|
34
|
+
/** Position (in local space) geometry texture */
|
|
35
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureLocalPosition"] = 16384] = "TextureLocalPosition";
|
|
36
|
+
/** Linear velocity geometry texture */
|
|
37
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureLinearVelocity"] = 32768] = "TextureLinearVelocity";
|
|
38
|
+
/** Bit field for all textures but back buffer depth/stencil */
|
|
39
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureAllButBackBufferDepthStencil"] = 16777211] = "TextureAllButBackBufferDepthStencil";
|
|
40
|
+
/** Bit field for all textures but back buffer */
|
|
41
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureAllButBackBuffer"] = 16777209] = "TextureAllButBackBuffer";
|
|
42
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["TextureAll"] = 16777215] = "TextureAll";
|
|
43
|
+
/** Camera */
|
|
44
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["Camera"] = 16777216] = "Camera";
|
|
45
|
+
/** List of objects (meshes, particle systems, sprites) */
|
|
46
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["ObjectList"] = 33554432] = "ObjectList";
|
|
47
|
+
/** Detect type based on connection */
|
|
48
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["AutoDetect"] = 268435456] = "AutoDetect";
|
|
49
|
+
/** Output type that will be defined by input type */
|
|
50
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["BasedOnInput"] = 536870912] = "BasedOnInput";
|
|
51
|
+
/** Undefined */
|
|
52
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["Undefined"] = 1073741824] = "Undefined";
|
|
53
|
+
/** Bitmask of all types */
|
|
54
|
+
NodeRenderGraphBlockConnectionPointTypes[NodeRenderGraphBlockConnectionPointTypes["All"] = 4294967295] = "All";
|
|
55
|
+
})(NodeRenderGraphBlockConnectionPointTypes || (NodeRenderGraphBlockConnectionPointTypes = {}));
|
|
56
|
+
/**
|
|
57
|
+
* Enum used to define the compatibility state between two connection points
|
|
58
|
+
*/
|
|
59
|
+
export var NodeRenderGraphConnectionPointCompatibilityStates;
|
|
60
|
+
(function (NodeRenderGraphConnectionPointCompatibilityStates) {
|
|
61
|
+
/** Points are compatibles */
|
|
62
|
+
NodeRenderGraphConnectionPointCompatibilityStates[NodeRenderGraphConnectionPointCompatibilityStates["Compatible"] = 0] = "Compatible";
|
|
63
|
+
/** Points are incompatible because of their types */
|
|
64
|
+
NodeRenderGraphConnectionPointCompatibilityStates[NodeRenderGraphConnectionPointCompatibilityStates["TypeIncompatible"] = 1] = "TypeIncompatible";
|
|
65
|
+
/** Points are incompatible because they are in the same hierarchy **/
|
|
66
|
+
NodeRenderGraphConnectionPointCompatibilityStates[NodeRenderGraphConnectionPointCompatibilityStates["HierarchyIssue"] = 2] = "HierarchyIssue";
|
|
67
|
+
})(NodeRenderGraphConnectionPointCompatibilityStates || (NodeRenderGraphConnectionPointCompatibilityStates = {}));
|
|
68
|
+
/**
|
|
69
|
+
* Defines the direction of a connection point
|
|
70
|
+
*/
|
|
71
|
+
export var NodeRenderGraphConnectionPointDirection;
|
|
72
|
+
(function (NodeRenderGraphConnectionPointDirection) {
|
|
73
|
+
/** Input */
|
|
74
|
+
NodeRenderGraphConnectionPointDirection[NodeRenderGraphConnectionPointDirection["Input"] = 0] = "Input";
|
|
75
|
+
/** Output */
|
|
76
|
+
NodeRenderGraphConnectionPointDirection[NodeRenderGraphConnectionPointDirection["Output"] = 1] = "Output";
|
|
77
|
+
})(NodeRenderGraphConnectionPointDirection || (NodeRenderGraphConnectionPointDirection = {}));
|
|
78
|
+
//# sourceMappingURL=nodeRenderGraphTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeRenderGraphTypes.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Types/nodeRenderGraphTypes.ts"],"names":[],"mappings":"AAmCA;;GAEG;AACH,MAAM,CAAN,IAAY,wCAqDX;AArDD,WAAY,wCAAwC;IAChD,8BAA8B;IAC9B,6GAAoB,CAAA;IACpB,gCAAgC;IAChC,iIAA8B,CAAA;IAC9B,2CAA2C;IAC3C,6KAAoD,CAAA;IACpD,+BAA+B;IAC/B,yJAA0C,CAAA;IAC1C,6CAA6C;IAC7C,gIAA6B,CAAA;IAC7B,8CAA8C;IAC9C,kIAA8B,CAAA;IAC9B,8BAA8B;IAC9B,0HAA0B,CAAA;IAC1B,oCAAoC;IACpC,uIAAgC,CAAA;IAChC,iDAAiD;IACjD,yIAAiC,CAAA;IACjC,gCAAgC;IAChC,+HAA4B,CAAA;IAC5B,kCAAkC;IAClC,oIAA8B,CAAA;IAC9B,qCAAqC;IACrC,oIAA8B,CAAA;IAC9B,+CAA+C;IAC/C,sIAA+B,CAAA;IAC/B,+CAA+C;IAC/C,sIAA+B,CAAA;IAC/B,iDAAiD;IACjD,2IAAiC,CAAA;IACjC,uCAAuC;IACvC,6IAAkC,CAAA;IAElC,+DAA+D;IAC/D,4KAAgD,CAAA;IAChD,iDAAiD;IACjD,oJAAoC,CAAA;IACpC,0HAAuB,CAAA;IAEvB,aAAa;IACb,kHAAmB,CAAA;IACnB,0DAA0D;IAC1D,0HAAuB,CAAA;IAEvB,sCAAsC;IACtC,2HAAuB,CAAA;IACvB,qDAAqD;IACrD,+HAAyB,CAAA;IACzB,gBAAgB;IAChB,0HAAsB,CAAA;IACtB,2BAA2B;IAC3B,8GAAgB,CAAA;AACpB,CAAC,EArDW,wCAAwC,KAAxC,wCAAwC,QAqDnD;AAED;;GAEG;AACH,MAAM,CAAN,IAAkB,iDAOjB;AAPD,WAAkB,iDAAiD;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":["import type { Color4 } from \"../../../Maths/math.color\";\r\nimport type { Scene } from \"../../../scene\";\r\nimport type { FrameGraphTextureHandle } from \"../../../FrameGraph/frameGraphTypes\";\r\nimport type { Camera } from \"../../../Cameras/camera\";\r\nimport type { FrameGraphObjectList } from \"core/FrameGraph/frameGraphObjectList\";\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 = 0x00fffffb,\r\n /** Bit field for all textures but back buffer */\r\n TextureAllButBackBuffer = 0x00fffff9,\r\n TextureAll = 0x00ffffff,\r\n\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 /** 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 = FrameGraphTextureHandle | Camera | FrameGraphObjectList;\r\n"]}
|