@onerjs/core 8.32.0 → 8.32.2
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/Audio/Interfaces/ISoundOptions.d.ts +1 -1
- package/Audio/Interfaces/ISoundOptions.js.map +1 -1
- package/Audio/audioEngine.d.ts +3 -4
- package/Audio/audioEngine.js +9 -6
- package/Audio/audioEngine.js.map +1 -1
- package/Audio/sound.d.ts +33 -54
- package/Audio/sound.js +450 -718
- package/Audio/sound.js.map +1 -1
- package/AudioV2/abstractAudio/abstractAudioOutNode.d.ts +1 -1
- package/AudioV2/abstractAudio/abstractAudioOutNode.js +1 -1
- package/AudioV2/abstractAudio/abstractAudioOutNode.js.map +1 -1
- package/AudioV2/abstractAudio/abstractSound.d.ts +1 -1
- package/AudioV2/abstractAudio/abstractSound.js +2 -2
- package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
- package/AudioV2/abstractAudio/abstractSoundSource.d.ts +11 -3
- package/AudioV2/abstractAudio/abstractSoundSource.js +37 -1
- package/AudioV2/abstractAudio/abstractSoundSource.js.map +1 -1
- package/AudioV2/abstractAudio/audioBus.d.ts +8 -3
- package/AudioV2/abstractAudio/audioBus.js +24 -1
- package/AudioV2/abstractAudio/audioBus.js.map +1 -1
- package/AudioV2/abstractAudio/staticSound.d.ts +1 -1
- package/AudioV2/abstractAudio/staticSound.js +2 -2
- package/AudioV2/abstractAudio/staticSound.js.map +1 -1
- package/AudioV2/abstractAudio/streamingSound.d.ts +1 -1
- package/AudioV2/abstractAudio/streamingSound.js +2 -2
- package/AudioV2/abstractAudio/streamingSound.js.map +1 -1
- package/AudioV2/abstractAudio/subNodes/abstractAudioSubGraph.d.ts +1 -1
- package/AudioV2/abstractAudio/subNodes/abstractAudioSubGraph.js +3 -0
- package/AudioV2/abstractAudio/subNodes/abstractAudioSubGraph.js.map +1 -1
- package/AudioV2/abstractAudio/subNodes/spatialAudioSubNode.d.ts +1 -0
- package/AudioV2/abstractAudio/subNodes/spatialAudioSubNode.js +1 -0
- package/AudioV2/abstractAudio/subNodes/spatialAudioSubNode.js.map +1 -1
- package/AudioV2/abstractAudio/subProperties/abstractSpatialAudio.d.ts +12 -2
- package/AudioV2/abstractAudio/subProperties/abstractSpatialAudio.js +2 -0
- package/AudioV2/abstractAudio/subProperties/abstractSpatialAudio.js.map +1 -1
- package/AudioV2/abstractAudio/subProperties/spatialAudio.d.ts +6 -0
- package/AudioV2/abstractAudio/subProperties/spatialAudio.js +25 -0
- package/AudioV2/abstractAudio/subProperties/spatialAudio.js.map +1 -1
- package/AudioV2/webAudio/components/webAudioParameterComponent.js +2 -2
- package/AudioV2/webAudio/components/webAudioParameterComponent.js.map +1 -1
- package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.d.ts +3 -0
- package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.js +14 -17
- package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.js.map +1 -1
- package/AudioV2/webAudio/subNodes/webAudioBusAndSoundSubGraph.js +1 -0
- package/AudioV2/webAudio/subNodes/webAudioBusAndSoundSubGraph.js.map +1 -1
- package/AudioV2/webAudio/subProperties/spatialWebAudio.js +1 -0
- package/AudioV2/webAudio/subProperties/spatialWebAudio.js.map +1 -1
- package/AudioV2/webAudio/webAudioBus.d.ts +2 -7
- package/AudioV2/webAudio/webAudioBus.js +4 -24
- package/AudioV2/webAudio/webAudioBus.js.map +1 -1
- package/AudioV2/webAudio/webAudioEngine.js +1 -0
- package/AudioV2/webAudio/webAudioEngine.js.map +1 -1
- package/AudioV2/webAudio/webAudioSoundSource.d.ts +2 -7
- package/AudioV2/webAudio/webAudioSoundSource.js +3 -24
- package/AudioV2/webAudio/webAudioSoundSource.js.map +1 -1
- package/AudioV2/webAudio/webAudioStaticSound.d.ts +3 -7
- package/AudioV2/webAudio/webAudioStaticSound.js +13 -26
- package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
- package/AudioV2/webAudio/webAudioStreamingSound.d.ts +3 -7
- package/AudioV2/webAudio/webAudioStreamingSound.js +6 -23
- package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
- package/Cameras/arcRotateCamera.js +4 -5
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Compute/computeEffect.js +5 -1
- package/Compute/computeEffect.js.map +1 -1
- package/Compute/computeShader.d.ts +4 -0
- package/Compute/computeShader.js +9 -3
- package/Compute/computeShader.js.map +1 -1
- package/Debug/debugLayer.d.ts +1 -1
- package/Debug/debugLayer.js.map +1 -1
- package/Engines/abstractEngine.d.ts +2 -2
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/thinEngine.js +1 -1
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +8 -9
- package/Engines/webgpuEngine.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.d.ts +74 -0
- package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.js +179 -0
- package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.js.map +1 -0
- 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/Blocks/lightingVolumeBlock.d.ts +43 -0
- package/FrameGraph/Node/Blocks/lightingVolumeBlock.js +93 -0
- package/FrameGraph/Node/Blocks/lightingVolumeBlock.js.map +1 -0
- package/FrameGraph/Passes/renderPass.js +2 -2
- package/FrameGraph/Passes/renderPass.js.map +1 -1
- package/FrameGraph/Tasks/Layers/baseLayerTask.d.ts +2 -0
- package/FrameGraph/Tasks/Layers/baseLayerTask.js +6 -0
- package/FrameGraph/Tasks/Layers/baseLayerTask.js.map +1 -1
- package/FrameGraph/Tasks/Layers/glowLayerTask.d.ts +1 -0
- package/FrameGraph/Tasks/Layers/glowLayerTask.js +3 -0
- package/FrameGraph/Tasks/Layers/glowLayerTask.js.map +1 -1
- package/FrameGraph/Tasks/Layers/highlightLayerTask.d.ts +1 -0
- package/FrameGraph/Tasks/Layers/highlightLayerTask.js +3 -0
- package/FrameGraph/Tasks/Layers/highlightLayerTask.js.map +1 -1
- package/FrameGraph/Tasks/Misc/computeShaderTask.d.ts +1 -0
- package/FrameGraph/Tasks/Misc/computeShaderTask.js +3 -0
- package/FrameGraph/Tasks/Misc/computeShaderTask.js.map +1 -1
- package/FrameGraph/Tasks/Misc/cullObjectsTask.d.ts +1 -0
- package/FrameGraph/Tasks/Misc/cullObjectsTask.js +3 -0
- package/FrameGraph/Tasks/Misc/cullObjectsTask.js.map +1 -1
- package/FrameGraph/Tasks/Misc/executeTask.d.ts +1 -0
- package/FrameGraph/Tasks/Misc/executeTask.js +3 -0
- package/FrameGraph/Tasks/Misc/executeTask.js.map +1 -1
- package/FrameGraph/Tasks/Misc/lightingVolumeTask.d.ts +32 -0
- package/FrameGraph/Tasks/Misc/lightingVolumeTask.js +63 -0
- package/FrameGraph/Tasks/Misc/lightingVolumeTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/anaglyphTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/anaglyphTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/anaglyphTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/bloomTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/bloomTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/blurTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/blurTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/blurTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/chromaticAberrationTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/chromaticAberrationTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/chromaticAberrationTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/colorCorrectionTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/colorCorrectionTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/colorCorrectionTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/convolutionTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/convolutionTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/convolutionTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/customPostProcessTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/customPostProcessTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/customPostProcessTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/filterTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/filterTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/filterTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/fxaaTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/fxaaTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/fxaaTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/grainTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/grainTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/grainTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/imageProcessingTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/imageProcessingTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/imageProcessingTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/motionBlurTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/motionBlurTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/motionBlurTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/passTask.d.ts +2 -0
- package/FrameGraph/Tasks/PostProcesses/passTask.js +6 -0
- package/FrameGraph/Tasks/PostProcesses/passTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.d.ts +3 -2
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/screenSpaceCurvatureTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/screenSpaceCurvatureTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/screenSpaceCurvatureTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/sharpenTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/sharpenTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/sharpenTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/ssao2BlurTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/ssao2BlurTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/ssao2BlurTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/ssao2Task.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/ssao2Task.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/ssao2Task.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/ssrBlurTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/ssrBlurTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/ssrBlurTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/ssrTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/ssrTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/ssrTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/taaTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/taaTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/taaTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/tonemapTask.d.ts +1 -0
- package/FrameGraph/Tasks/PostProcesses/tonemapTask.js +3 -0
- package/FrameGraph/Tasks/PostProcesses/tonemapTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/volumetricLightingBlendVolumeTask.d.ts +31 -0
- package/FrameGraph/Tasks/PostProcesses/volumetricLightingBlendVolumeTask.js +60 -0
- package/FrameGraph/Tasks/PostProcesses/volumetricLightingBlendVolumeTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/volumetricLightingTask.d.ts +93 -0
- package/FrameGraph/Tasks/PostProcesses/volumetricLightingTask.js +183 -0
- package/FrameGraph/Tasks/PostProcesses/volumetricLightingTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.d.ts +1 -0
- package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.js +3 -0
- package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +1 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +3 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +1 -0
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js +4 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.d.ts +1 -0
- package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.js +3 -0
- package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/utilityLayerRendererTask.d.ts +1 -0
- package/FrameGraph/Tasks/Rendering/utilityLayerRendererTask.js +3 -0
- package/FrameGraph/Tasks/Rendering/utilityLayerRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Texture/clearTextureTask.d.ts +1 -0
- package/FrameGraph/Tasks/Texture/clearTextureTask.js +4 -1
- package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
- package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.d.ts +1 -0
- package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.js +3 -0
- package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.js.map +1 -1
- package/FrameGraph/Tasks/Texture/copyToTextureTask.d.ts +1 -0
- package/FrameGraph/Tasks/Texture/copyToTextureTask.js +21 -4
- package/FrameGraph/Tasks/Texture/copyToTextureTask.js.map +1 -1
- package/FrameGraph/Tasks/Texture/generateMipMapsTask.d.ts +1 -0
- package/FrameGraph/Tasks/Texture/generateMipMapsTask.js +3 -0
- package/FrameGraph/Tasks/Texture/generateMipMapsTask.js.map +1 -1
- package/FrameGraph/frameGraphRenderContext.d.ts +3 -2
- package/FrameGraph/frameGraphRenderContext.js +14 -5
- package/FrameGraph/frameGraphRenderContext.js.map +1 -1
- package/FrameGraph/frameGraphTask.d.ts +5 -0
- package/FrameGraph/frameGraphTask.js +11 -2
- package/FrameGraph/frameGraphTask.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/Inputs/scene.inputManager.d.ts +8 -0
- package/Inputs/scene.inputManager.js +33 -2
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Lights/lightingVolume.d.ts +12 -6
- package/Lights/lightingVolume.js +218 -108
- package/Lights/lightingVolume.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +2 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +2 -2
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/geometry.d.ts +2 -1
- package/Meshes/geometry.js +6 -2
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/mesh.d.ts +2 -1
- package/Meshes/mesh.js +4 -3
- package/Meshes/mesh.js.map +1 -1
- package/Particles/Node/Blocks/Update/updateFlowMapBlock.d.ts +9 -1
- package/Particles/Node/Blocks/Update/updateFlowMapBlock.js +8 -0
- package/Particles/Node/Blocks/Update/updateFlowMapBlock.js.map +1 -1
- package/Particles/Node/Blocks/Update/updateNoiseBlock.d.ts +39 -0
- package/Particles/Node/Blocks/Update/updateNoiseBlock.js +102 -0
- package/Particles/Node/Blocks/Update/updateNoiseBlock.js.map +1 -0
- package/Particles/Node/Blocks/index.d.ts +1 -0
- package/Particles/Node/Blocks/index.js +1 -0
- package/Particles/Node/Blocks/index.js.map +1 -1
- package/Particles/Node/Blocks/particleSourceTextureBlock.d.ts +9 -5
- package/Particles/Node/Blocks/particleSourceTextureBlock.js +31 -13
- package/Particles/Node/Blocks/particleSourceTextureBlock.js.map +1 -1
- package/Particles/Node/nodeParticleSystemSet.helper.js +39 -21
- package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
- package/Particles/particle.d.ts +2 -2
- package/Particles/particle.js +4 -2
- package/Particles/particle.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +1 -1
- package/Particles/thinParticleSystem.function.js +2 -2
- package/Particles/thinParticleSystem.function.js.map +1 -1
- package/Particles/thinParticleSystem.js.map +1 -1
- package/Physics/v2/characterController.d.ts +42 -2
- package/Physics/v2/characterController.js +140 -46
- package/Physics/v2/characterController.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +2 -2
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/volumetricLightingBlendVolume.fragment.d.ts +5 -0
- package/Shaders/volumetricLightingBlendVolume.fragment.js +21 -0
- package/Shaders/volumetricLightingBlendVolume.fragment.js.map +1 -0
- package/Shaders/volumetricLightingRenderVolume.fragment.d.ts +7 -0
- package/Shaders/volumetricLightingRenderVolume.fragment.js +25 -0
- package/Shaders/volumetricLightingRenderVolume.fragment.js.map +1 -0
- package/Shaders/volumetricLightingRenderVolume.vertex.d.ts +9 -0
- package/Shaders/volumetricLightingRenderVolume.vertex.js +18 -0
- package/Shaders/volumetricLightingRenderVolume.vertex.js.map +1 -0
- package/ShadersWGSL/gaussianSplatting.vertex.js +3 -3
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/lightingVolume.compute.js +10 -4
- package/ShadersWGSL/lightingVolume.compute.js.map +1 -1
- package/ShadersWGSL/volumetricLightingBlendVolume.fragment.d.ts +5 -0
- package/ShadersWGSL/volumetricLightingBlendVolume.fragment.js +22 -0
- package/ShadersWGSL/volumetricLightingBlendVolume.fragment.js.map +1 -0
- package/ShadersWGSL/volumetricLightingRenderVolume.fragment.d.ts +7 -0
- package/ShadersWGSL/volumetricLightingRenderVolume.fragment.js +27 -0
- package/ShadersWGSL/volumetricLightingRenderVolume.fragment.js.map +1 -0
- package/ShadersWGSL/volumetricLightingRenderVolume.vertex.d.ts +7 -0
- package/ShadersWGSL/volumetricLightingRenderVolume.vertex.js +17 -0
- package/ShadersWGSL/volumetricLightingRenderVolume.vertex.js.map +1 -0
- package/States/IStencilState.d.ts +48 -2
- package/States/IStencilState.js.map +1 -1
- package/States/alphaCullingState.d.ts +1 -0
- package/States/alphaCullingState.js +3 -0
- package/States/alphaCullingState.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { FrameGraph, NodeRenderGraphBuildState, NodeRenderGraphConnectionPoint, Scene } from "../../../../index.js";
|
|
2
|
+
import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
|
|
3
|
+
import { FrameGraphVolumetricLightingTask } from "../../../Tasks/PostProcesses/volumetricLightingTask.js";
|
|
4
|
+
import { Vector3 } from "../../../../Maths/math.vector.js";
|
|
5
|
+
import { Color3 } from "../../../../Maths/math.color.js";
|
|
6
|
+
/**
|
|
7
|
+
* Block that implements the volumetric lighting post process
|
|
8
|
+
*/
|
|
9
|
+
export declare class NodeRenderGraphVolumetricLightingBlock extends NodeRenderGraphBlock {
|
|
10
|
+
protected _frameGraphTask: FrameGraphVolumetricLightingTask;
|
|
11
|
+
_additionalConstructionParameters: [boolean];
|
|
12
|
+
/**
|
|
13
|
+
* Gets the frame graph task associated with this block
|
|
14
|
+
*/
|
|
15
|
+
get task(): FrameGraphVolumetricLightingTask;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new NodeRenderGraphVolumetricLightingBlock
|
|
18
|
+
* @param name defines the block name
|
|
19
|
+
* @param frameGraph defines the hosting frame graph
|
|
20
|
+
* @param scene defines the hosting scene
|
|
21
|
+
* @param enableExtinction defines whether to enable extinction coefficients
|
|
22
|
+
*/
|
|
23
|
+
constructor(name: string, frameGraph: FrameGraph, scene: Scene, enableExtinction?: boolean);
|
|
24
|
+
private _createTask;
|
|
25
|
+
/** Gets or sets the phaseG parameter */
|
|
26
|
+
get phaseG(): number;
|
|
27
|
+
set phaseG(value: number);
|
|
28
|
+
/** If extinction coefficients should be used */
|
|
29
|
+
get enableExtinction(): boolean;
|
|
30
|
+
set enableExtinction(value: boolean);
|
|
31
|
+
/** Gets or sets the extinction color */
|
|
32
|
+
get extinction(): Vector3;
|
|
33
|
+
set extinction(value: Vector3);
|
|
34
|
+
/** Gets or sets the light power */
|
|
35
|
+
get lightPower(): Color3;
|
|
36
|
+
set lightPower(value: Color3);
|
|
37
|
+
/**
|
|
38
|
+
* Gets the current class name
|
|
39
|
+
* @returns the class name
|
|
40
|
+
*/
|
|
41
|
+
getClassName(): string;
|
|
42
|
+
/**
|
|
43
|
+
* Gets the target input component
|
|
44
|
+
*/
|
|
45
|
+
get target(): NodeRenderGraphConnectionPoint;
|
|
46
|
+
/**
|
|
47
|
+
* Gets the depth texture input component
|
|
48
|
+
*/
|
|
49
|
+
get depth(): NodeRenderGraphConnectionPoint;
|
|
50
|
+
/**
|
|
51
|
+
* Gets the camera input component
|
|
52
|
+
*/
|
|
53
|
+
get camera(): NodeRenderGraphConnectionPoint;
|
|
54
|
+
/**
|
|
55
|
+
* Gets the lighting volume mesh input component
|
|
56
|
+
*/
|
|
57
|
+
get lightingVolumeMesh(): NodeRenderGraphConnectionPoint;
|
|
58
|
+
/**
|
|
59
|
+
* Gets the light input component
|
|
60
|
+
*/
|
|
61
|
+
get light(): NodeRenderGraphConnectionPoint;
|
|
62
|
+
/**
|
|
63
|
+
* Gets the lighting volume texture input component
|
|
64
|
+
*/
|
|
65
|
+
get lightingVolumeTexture(): NodeRenderGraphConnectionPoint;
|
|
66
|
+
/**
|
|
67
|
+
* Gets the output component
|
|
68
|
+
*/
|
|
69
|
+
get output(): NodeRenderGraphConnectionPoint;
|
|
70
|
+
protected _buildBlock(state: NodeRenderGraphBuildState): void;
|
|
71
|
+
protected _dumpPropertiesCode(): string;
|
|
72
|
+
serialize(): any;
|
|
73
|
+
_deserialize(serializationObject: any): void;
|
|
74
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { __decorate } from "../../../../tslib.es6.js";
|
|
2
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
3
|
+
import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
|
|
4
|
+
import { NodeRenderGraphBlock } from "../../nodeRenderGraphBlock.js";
|
|
5
|
+
import { FrameGraphVolumetricLightingTask } from "../../../Tasks/PostProcesses/volumetricLightingTask.js";
|
|
6
|
+
import { NodeRenderGraphBlockConnectionPointTypes } from "../../Types/nodeRenderGraphTypes.js";
|
|
7
|
+
import { Vector3 } from "../../../../Maths/math.vector.js";
|
|
8
|
+
import { Color3 } from "../../../../Maths/math.color.js";
|
|
9
|
+
/**
|
|
10
|
+
* Block that implements the volumetric lighting post process
|
|
11
|
+
*/
|
|
12
|
+
export class NodeRenderGraphVolumetricLightingBlock extends NodeRenderGraphBlock {
|
|
13
|
+
/**
|
|
14
|
+
* Gets the frame graph task associated with this block
|
|
15
|
+
*/
|
|
16
|
+
get task() {
|
|
17
|
+
return this._frameGraphTask;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create a new NodeRenderGraphVolumetricLightingBlock
|
|
21
|
+
* @param name defines the block name
|
|
22
|
+
* @param frameGraph defines the hosting frame graph
|
|
23
|
+
* @param scene defines the hosting scene
|
|
24
|
+
* @param enableExtinction defines whether to enable extinction coefficients
|
|
25
|
+
*/
|
|
26
|
+
constructor(name, frameGraph, scene, enableExtinction = false) {
|
|
27
|
+
super(name, frameGraph, scene);
|
|
28
|
+
this._additionalConstructionParameters = [enableExtinction];
|
|
29
|
+
this.registerInput("target", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);
|
|
30
|
+
this.registerInput("depth", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);
|
|
31
|
+
this.registerInput("camera", NodeRenderGraphBlockConnectionPointTypes.Camera);
|
|
32
|
+
this.registerInput("lightingVolumeMesh", NodeRenderGraphBlockConnectionPointTypes.ObjectList);
|
|
33
|
+
this.registerInput("light", NodeRenderGraphBlockConnectionPointTypes.ShadowLight);
|
|
34
|
+
this.registerInput("lightingVolumeTexture", NodeRenderGraphBlockConnectionPointTypes.AutoDetect, true);
|
|
35
|
+
this.target.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);
|
|
36
|
+
this.lightingVolumeTexture.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);
|
|
37
|
+
this.depth.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment | NodeRenderGraphBlockConnectionPointTypes.TextureScreenDepth);
|
|
38
|
+
this._addDependenciesInput();
|
|
39
|
+
this.registerOutput("output", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);
|
|
40
|
+
this.output._typeConnectionSource = () => {
|
|
41
|
+
return this.target;
|
|
42
|
+
};
|
|
43
|
+
this._frameGraphTask = new FrameGraphVolumetricLightingTask(name, frameGraph, enableExtinction);
|
|
44
|
+
}
|
|
45
|
+
_createTask(enableExtinction) {
|
|
46
|
+
const sourceSamplingMode = this._frameGraphTask.sourceSamplingMode;
|
|
47
|
+
const phaseG = this._frameGraphTask.phaseG;
|
|
48
|
+
const extinction = this._frameGraphTask.extinction;
|
|
49
|
+
const lightPower = this._frameGraphTask.lightPower;
|
|
50
|
+
this._frameGraphTask.dispose();
|
|
51
|
+
this._frameGraphTask = new FrameGraphVolumetricLightingTask(this.name, this._frameGraph, enableExtinction);
|
|
52
|
+
this._frameGraphTask.sourceSamplingMode = sourceSamplingMode;
|
|
53
|
+
this._frameGraphTask.phaseG = phaseG;
|
|
54
|
+
this._frameGraphTask.extinction = extinction;
|
|
55
|
+
this._frameGraphTask.lightPower = lightPower;
|
|
56
|
+
this._additionalConstructionParameters = [enableExtinction];
|
|
57
|
+
}
|
|
58
|
+
/** Gets or sets the phaseG parameter */
|
|
59
|
+
get phaseG() {
|
|
60
|
+
return this._frameGraphTask.phaseG;
|
|
61
|
+
}
|
|
62
|
+
set phaseG(value) {
|
|
63
|
+
this._frameGraphTask.phaseG = value;
|
|
64
|
+
}
|
|
65
|
+
/** If extinction coefficients should be used */
|
|
66
|
+
get enableExtinction() {
|
|
67
|
+
return this._frameGraphTask.enableExtinction;
|
|
68
|
+
}
|
|
69
|
+
set enableExtinction(value) {
|
|
70
|
+
this._createTask(value);
|
|
71
|
+
}
|
|
72
|
+
/** Gets or sets the extinction color */
|
|
73
|
+
get extinction() {
|
|
74
|
+
return this._frameGraphTask.extinction;
|
|
75
|
+
}
|
|
76
|
+
set extinction(value) {
|
|
77
|
+
this._frameGraphTask.extinction = value;
|
|
78
|
+
}
|
|
79
|
+
/** Gets or sets the light power */
|
|
80
|
+
get lightPower() {
|
|
81
|
+
return this._frameGraphTask.lightPower;
|
|
82
|
+
}
|
|
83
|
+
set lightPower(value) {
|
|
84
|
+
this._frameGraphTask.lightPower = value;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Gets the current class name
|
|
88
|
+
* @returns the class name
|
|
89
|
+
*/
|
|
90
|
+
getClassName() {
|
|
91
|
+
return "NodeRenderGraphVolumetricLightingBlock";
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Gets the target input component
|
|
95
|
+
*/
|
|
96
|
+
get target() {
|
|
97
|
+
return this._inputs[0];
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Gets the depth texture input component
|
|
101
|
+
*/
|
|
102
|
+
get depth() {
|
|
103
|
+
return this._inputs[1];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Gets the camera input component
|
|
107
|
+
*/
|
|
108
|
+
get camera() {
|
|
109
|
+
return this._inputs[2];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Gets the lighting volume mesh input component
|
|
113
|
+
*/
|
|
114
|
+
get lightingVolumeMesh() {
|
|
115
|
+
return this._inputs[3];
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Gets the light input component
|
|
119
|
+
*/
|
|
120
|
+
get light() {
|
|
121
|
+
return this._inputs[4];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Gets the lighting volume texture input component
|
|
125
|
+
*/
|
|
126
|
+
get lightingVolumeTexture() {
|
|
127
|
+
return this._inputs[5];
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Gets the output component
|
|
131
|
+
*/
|
|
132
|
+
get output() {
|
|
133
|
+
return this._outputs[0];
|
|
134
|
+
}
|
|
135
|
+
_buildBlock(state) {
|
|
136
|
+
super._buildBlock(state);
|
|
137
|
+
this.output.value = this._frameGraphTask.outputTexture;
|
|
138
|
+
this._frameGraphTask.targetTexture = this.target.connectedPoint?.value;
|
|
139
|
+
this._frameGraphTask.depthTexture = this.depth.connectedPoint?.value;
|
|
140
|
+
this._frameGraphTask.camera = this.camera.connectedPoint?.value;
|
|
141
|
+
this._frameGraphTask.lightingVolumeMesh = this.lightingVolumeMesh.connectedPoint?.value;
|
|
142
|
+
this._frameGraphTask.light = this.light.connectedPoint?.value;
|
|
143
|
+
this._frameGraphTask.lightingVolumeTexture = this.lightingVolumeTexture.connectedPoint?.value;
|
|
144
|
+
}
|
|
145
|
+
_dumpPropertiesCode() {
|
|
146
|
+
const codes = [];
|
|
147
|
+
codes.push(`${this._codeVariableName}.phaseG = ${this.phaseG};`);
|
|
148
|
+
codes.push(`${this._codeVariableName}.extinction = new BABYLON.Vector3(${this.extinction.x}, ${this.extinction.y}, ${this.extinction.z});`);
|
|
149
|
+
codes.push(`${this._codeVariableName}.lightPower = new Color3(${this.lightPower.r}, ${this.lightPower.g}, ${this.lightPower.b});`);
|
|
150
|
+
return super._dumpPropertiesCode() + codes.join("\n");
|
|
151
|
+
}
|
|
152
|
+
serialize() {
|
|
153
|
+
const serializationObject = super.serialize();
|
|
154
|
+
serializationObject.phaseG = this.phaseG;
|
|
155
|
+
serializationObject.extinction = this.extinction.asArray();
|
|
156
|
+
serializationObject.lightPower = this.lightPower.asArray();
|
|
157
|
+
return serializationObject;
|
|
158
|
+
}
|
|
159
|
+
_deserialize(serializationObject) {
|
|
160
|
+
super._deserialize(serializationObject);
|
|
161
|
+
this.phaseG = serializationObject.phaseG;
|
|
162
|
+
this.extinction = Vector3.FromArray(serializationObject.extinction);
|
|
163
|
+
this.lightPower = Color3.FromArray(serializationObject.lightPower);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
__decorate([
|
|
167
|
+
editableInPropertyPage("PhaseG", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: -0.9, max: 0.9 })
|
|
168
|
+
], NodeRenderGraphVolumetricLightingBlock.prototype, "phaseG", null);
|
|
169
|
+
__decorate([
|
|
170
|
+
editableInPropertyPage("Enable extinction", 0 /* PropertyTypeForEdition.Boolean */, "PROPERTIES")
|
|
171
|
+
], NodeRenderGraphVolumetricLightingBlock.prototype, "enableExtinction", null);
|
|
172
|
+
__decorate([
|
|
173
|
+
editableInPropertyPage("Extinction", 4 /* PropertyTypeForEdition.Vector3 */, "PROPERTIES")
|
|
174
|
+
], NodeRenderGraphVolumetricLightingBlock.prototype, "extinction", null);
|
|
175
|
+
__decorate([
|
|
176
|
+
editableInPropertyPage("Light power", 6 /* PropertyTypeForEdition.Color3 */, "PROPERTIES")
|
|
177
|
+
], NodeRenderGraphVolumetricLightingBlock.prototype, "lightPower", null);
|
|
178
|
+
RegisterClass("BABYLON.NodeRenderGraphVolumetricLightingBlock", NodeRenderGraphVolumetricLightingBlock);
|
|
179
|
+
//# sourceMappingURL=volumetricLightingBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"volumetricLightingBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.ts"],"names":[],"mappings":";AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,gCAAgC,EAAE,+DAAmE;AAC9G,OAAO,EAAE,wCAAwC,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,yCAA+B;AACjD,OAAO,EAAE,MAAM,EAAE,wCAA8B;AAE/C;;GAEG;AACH,MAAM,OAAO,sCAAuC,SAAQ,oBAAoB;IAK5E;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;;OAMG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY,EAAE,gBAAgB,GAAG,KAAK;QAC3F,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,iCAAiC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAE5D,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,wCAAwC,CAAC,UAAU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CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACpE,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;IACvE,CAAC;CACJ;AAlIG;IADC,sBAAsB,CAAC,QAAQ,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;oEAGrG;AAQD;IADC,sBAAsB,CAAC,mBAAmB,0CAAkC,YAAY,CAAC;8EAGzF;AAQD;IADC,sBAAsB,CAAC,YAAY,0CAAkC,YAAY,CAAC;wEAGlF;AAQD;IADC,sBAAsB,CAAC,aAAa,yCAAiC,YAAY,CAAC;wEAGlF;AAoGL,aAAa,CAAC,gDAAgD,EAAE,sCAAsC,CAAC,CAAC","sourcesContent":["import type {\r\n Camera,\r\n DirectionalLight,\r\n FrameGraph,\r\n FrameGraphObjectList,\r\n FrameGraphTextureHandle,\r\n NodeRenderGraphBuildState,\r\n NodeRenderGraphConnectionPoint,\r\n Scene,\r\n} from \"core/index\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock\";\r\nimport { FrameGraphVolumetricLightingTask } from \"core/FrameGraph/Tasks/PostProcesses/volumetricLightingTask\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { Vector3 } from \"core/Maths/math.vector\";\r\nimport { Color3 } from \"core/Maths/math.color\";\r\n\r\n/**\r\n * Block that implements the volumetric lighting post process\r\n */\r\nexport class NodeRenderGraphVolumetricLightingBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphVolumetricLightingTask;\r\n\r\n public override _additionalConstructionParameters: [boolean];\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 NodeRenderGraphVolumetricLightingBlock\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 enableExtinction defines whether to enable extinction coefficients\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene, enableExtinction = false) {\r\n super(name, frameGraph, scene);\r\n\r\n this._additionalConstructionParameters = [enableExtinction];\r\n\r\n this.registerInput(\"target\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"depth\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\r\n this.registerInput(\"lightingVolumeMesh\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\r\n this.registerInput(\"light\", NodeRenderGraphBlockConnectionPointTypes.ShadowLight);\r\n this.registerInput(\"lightingVolumeTexture\", NodeRenderGraphBlockConnectionPointTypes.AutoDetect, true);\r\n\r\n this.target.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\r\n this.lightingVolumeTexture.addExcludedConnectionPointFromAllowedTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\r\n\r\n this.depth.addExcludedConnectionPointFromAllowedTypes(\r\n NodeRenderGraphBlockConnectionPointTypes.TextureDepthStencilAttachment | NodeRenderGraphBlockConnectionPointTypes.TextureScreenDepth\r\n );\r\n\r\n this._addDependenciesInput();\r\n\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this.output._typeConnectionSource = () => {\r\n return this.target;\r\n };\r\n\r\n this._frameGraphTask = new FrameGraphVolumetricLightingTask(name, frameGraph, enableExtinction);\r\n }\r\n\r\n private _createTask(enableExtinction: boolean) {\r\n const sourceSamplingMode = this._frameGraphTask.sourceSamplingMode;\r\n const phaseG = this._frameGraphTask.phaseG;\r\n const extinction = this._frameGraphTask.extinction;\r\n const lightPower = this._frameGraphTask.lightPower;\r\n\r\n this._frameGraphTask.dispose();\r\n\r\n this._frameGraphTask = new FrameGraphVolumetricLightingTask(this.name, this._frameGraph, enableExtinction);\r\n this._frameGraphTask.sourceSamplingMode = sourceSamplingMode;\r\n this._frameGraphTask.phaseG = phaseG;\r\n this._frameGraphTask.extinction = extinction;\r\n this._frameGraphTask.lightPower = lightPower;\r\n\r\n this._additionalConstructionParameters = [enableExtinction];\r\n }\r\n\r\n /** Gets or sets the phaseG parameter */\r\n @editableInPropertyPage(\"PhaseG\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: -0.9, max: 0.9 })\r\n public get phaseG(): number {\r\n return this._frameGraphTask.phaseG;\r\n }\r\n\r\n public set phaseG(value: number) {\r\n this._frameGraphTask.phaseG = value;\r\n }\r\n\r\n /** If extinction coefficients should be used */\r\n @editableInPropertyPage(\"Enable extinction\", PropertyTypeForEdition.Boolean, \"PROPERTIES\")\r\n public get enableExtinction(): boolean {\r\n return this._frameGraphTask.enableExtinction;\r\n }\r\n\r\n public set enableExtinction(value: boolean) {\r\n this._createTask(value);\r\n }\r\n\r\n /** Gets or sets the extinction color */\r\n @editableInPropertyPage(\"Extinction\", PropertyTypeForEdition.Vector3, \"PROPERTIES\")\r\n public get extinction(): Vector3 {\r\n return this._frameGraphTask.extinction;\r\n }\r\n\r\n public set extinction(value: Vector3) {\r\n this._frameGraphTask.extinction = value;\r\n }\r\n\r\n /** Gets or sets the light power */\r\n @editableInPropertyPage(\"Light power\", PropertyTypeForEdition.Color3, \"PROPERTIES\")\r\n public get lightPower(): Color3 {\r\n return this._frameGraphTask.lightPower;\r\n }\r\n\r\n public set lightPower(value: Color3) {\r\n this._frameGraphTask.lightPower = 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 \"NodeRenderGraphVolumetricLightingBlock\";\r\n }\r\n\r\n /**\r\n * Gets the target input component\r\n */\r\n public get target(): 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 lighting volume mesh input component\r\n */\r\n public get lightingVolumeMesh(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the light input component\r\n */\r\n public get light(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the lighting volume texture input component\r\n */\r\n public get lightingVolumeTexture(): 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 protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this.output.value = this._frameGraphTask.outputTexture;\r\n\r\n this._frameGraphTask.targetTexture = this.target.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.lightingVolumeMesh = this.lightingVolumeMesh.connectedPoint?.value as FrameGraphObjectList;\r\n this._frameGraphTask.light = this.light.connectedPoint?.value as DirectionalLight;\r\n this._frameGraphTask.lightingVolumeTexture = this.lightingVolumeTexture.connectedPoint?.value as FrameGraphTextureHandle;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.phaseG = ${this.phaseG};`);\r\n codes.push(`${this._codeVariableName}.extinction = new BABYLON.Vector3(${this.extinction.x}, ${this.extinction.y}, ${this.extinction.z});`);\r\n codes.push(`${this._codeVariableName}.lightPower = new Color3(${this.lightPower.r}, ${this.lightPower.g}, ${this.lightPower.b});`);\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.phaseG = this.phaseG;\r\n serializationObject.extinction = this.extinction.asArray();\r\n serializationObject.lightPower = this.lightPower.asArray();\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.phaseG = serializationObject.phaseG;\r\n this.extinction = Vector3.FromArray(serializationObject.extinction);\r\n this.lightPower = Color3.FromArray(serializationObject.lightPower);\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphVolumetricLightingBlock\", NodeRenderGraphVolumetricLightingBlock);\r\n"]}
|
|
@@ -3,6 +3,7 @@ export * from "./cullObjectsBlock.js";
|
|
|
3
3
|
export * from "./elbowBlock.js";
|
|
4
4
|
export * from "./executeBlock.js";
|
|
5
5
|
export * from "./inputBlock.js";
|
|
6
|
+
export * from "./lightingVolumeBlock.js";
|
|
6
7
|
export * from "./outputBlock.js";
|
|
7
8
|
export * from "./resourceContainerBlock.js";
|
|
8
9
|
export * from "./Layers/glowLayerBlock.js";
|
|
@@ -31,6 +32,7 @@ export * from "./PostProcesses/ssao2PostProcessBlock.js";
|
|
|
31
32
|
export * from "./PostProcesses/ssrPostProcessBlock.js";
|
|
32
33
|
export * from "./PostProcesses/taaPostProcessBlock.js";
|
|
33
34
|
export * from "./PostProcesses/tonemapPostProcessBlock.js";
|
|
35
|
+
export * from "./PostProcesses/volumetricLightingBlock.js";
|
|
34
36
|
export * from "./Rendering/csmShadowGeneratorBlock.js";
|
|
35
37
|
export * from "./Rendering/geometryRendererBlock.js";
|
|
36
38
|
export * from "./Rendering/objectRendererBlock.js";
|
|
@@ -3,6 +3,7 @@ export * from "./cullObjectsBlock.js";
|
|
|
3
3
|
export * from "./elbowBlock.js";
|
|
4
4
|
export * from "./executeBlock.js";
|
|
5
5
|
export * from "./inputBlock.js";
|
|
6
|
+
export * from "./lightingVolumeBlock.js";
|
|
6
7
|
export * from "./outputBlock.js";
|
|
7
8
|
export * from "./resourceContainerBlock.js";
|
|
8
9
|
export * from "./Layers/glowLayerBlock.js";
|
|
@@ -31,6 +32,7 @@ export * from "./PostProcesses/ssao2PostProcessBlock.js";
|
|
|
31
32
|
export * from "./PostProcesses/ssrPostProcessBlock.js";
|
|
32
33
|
export * from "./PostProcesses/taaPostProcessBlock.js";
|
|
33
34
|
export * from "./PostProcesses/tonemapPostProcessBlock.js";
|
|
35
|
+
export * from "./PostProcesses/volumetricLightingBlock.js";
|
|
34
36
|
export * from "./Rendering/csmShadowGeneratorBlock.js";
|
|
35
37
|
export * from "./Rendering/geometryRendererBlock.js";
|
|
36
38
|
export * from "./Rendering/objectRendererBlock.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,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,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sDAAsD,CAAC;AACrE,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AAExD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from \"./computeShaderBlock\";\r\nexport * from \"./cullObjectsBlock\";\r\nexport * 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/anaglyphPostProcessBlock\";\r\nexport * from \"./PostProcesses/basePostProcessBlock\";\r\nexport * from \"./PostProcesses/baseWithPropertiesPostProcessBlock\";\r\nexport * from \"./PostProcesses/blackAndWhitePostProcessBlock\";\r\nexport * from \"./PostProcesses/bloomPostProcessBlock\";\r\nexport * from \"./PostProcesses/blurPostProcessBlock\";\r\nexport * from \"./PostProcesses/chromaticAberrationPostProcessBlock\";\r\nexport * from \"./PostProcesses/circleOfConfusionPostProcessBlock\";\r\nexport * from \"./PostProcesses/colorCorrectionPostProcessBlock\";\r\nexport * from \"./PostProcesses/convolutionPostProcessBlock\";\r\nexport * from \"./PostProcesses/depthOfFieldPostProcessBlock\";\r\nexport * from \"./PostProcesses/extractHighlightsPostProcessBlock\";\r\nexport * from \"./PostProcesses/filterPostProcessBlock\";\r\nexport * from \"./PostProcesses/fxaaPostProcessBlock\";\r\nexport * from \"./PostProcesses/grainPostProcessBlock\";\r\nexport * from \"./PostProcesses/imageProcessingPostProcessBlock\";\r\nexport * from \"./PostProcesses/motionBlurPostProcessBlock\";\r\nexport * from \"./PostProcesses/passPostProcessBlock\";\r\nexport * from \"./PostProcesses/sharpenPostProcessBlock\";\r\nexport * from \"./PostProcesses/screenSpaceCurvaturePostProcessBlock\";\r\nexport * from \"./PostProcesses/ssao2PostProcessBlock\";\r\nexport * from \"./PostProcesses/ssrPostProcessBlock\";\r\nexport * from \"./PostProcesses/taaPostProcessBlock\";\r\nexport * from \"./PostProcesses/tonemapPostProcessBlock\";\r\n\r\nexport * from \"./Rendering/csmShadowGeneratorBlock\";\r\nexport * from \"./Rendering/geometryRendererBlock\";\r\nexport * from \"./Rendering/objectRendererBlock\";\r\nexport * from \"./Rendering/shadowGeneratorBlock\";\r\nexport * from \"./Rendering/utilityLayerRendererBlock\";\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
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sDAAsD,CAAC;AACrE,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AAExD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from \"./computeShaderBlock\";\r\nexport * from \"./cullObjectsBlock\";\r\nexport * from \"./elbowBlock\";\r\nexport * from \"./executeBlock\";\r\nexport * from \"./inputBlock\";\r\nexport * from \"./lightingVolumeBlock\";\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/anaglyphPostProcessBlock\";\r\nexport * from \"./PostProcesses/basePostProcessBlock\";\r\nexport * from \"./PostProcesses/baseWithPropertiesPostProcessBlock\";\r\nexport * from \"./PostProcesses/blackAndWhitePostProcessBlock\";\r\nexport * from \"./PostProcesses/bloomPostProcessBlock\";\r\nexport * from \"./PostProcesses/blurPostProcessBlock\";\r\nexport * from \"./PostProcesses/chromaticAberrationPostProcessBlock\";\r\nexport * from \"./PostProcesses/circleOfConfusionPostProcessBlock\";\r\nexport * from \"./PostProcesses/colorCorrectionPostProcessBlock\";\r\nexport * from \"./PostProcesses/convolutionPostProcessBlock\";\r\nexport * from \"./PostProcesses/depthOfFieldPostProcessBlock\";\r\nexport * from \"./PostProcesses/extractHighlightsPostProcessBlock\";\r\nexport * from \"./PostProcesses/filterPostProcessBlock\";\r\nexport * from \"./PostProcesses/fxaaPostProcessBlock\";\r\nexport * from \"./PostProcesses/grainPostProcessBlock\";\r\nexport * from \"./PostProcesses/imageProcessingPostProcessBlock\";\r\nexport * from \"./PostProcesses/motionBlurPostProcessBlock\";\r\nexport * from \"./PostProcesses/passPostProcessBlock\";\r\nexport * from \"./PostProcesses/sharpenPostProcessBlock\";\r\nexport * from \"./PostProcesses/screenSpaceCurvaturePostProcessBlock\";\r\nexport * from \"./PostProcesses/ssao2PostProcessBlock\";\r\nexport * from \"./PostProcesses/ssrPostProcessBlock\";\r\nexport * from \"./PostProcesses/taaPostProcessBlock\";\r\nexport * from \"./PostProcesses/tonemapPostProcessBlock\";\r\nexport * from \"./PostProcesses/volumetricLightingBlock\";\r\n\r\nexport * from \"./Rendering/csmShadowGeneratorBlock\";\r\nexport * from \"./Rendering/geometryRendererBlock\";\r\nexport * from \"./Rendering/objectRendererBlock\";\r\nexport * from \"./Rendering/shadowGeneratorBlock\";\r\nexport * from \"./Rendering/utilityLayerRendererBlock\";\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"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { FrameGraph, NodeRenderGraphBuildState, NodeRenderGraphConnectionPoint, Scene } from "../../../index.js";
|
|
2
|
+
import { FrameGraphLightingVolumeTask } from "../../Tasks/Misc/lightingVolumeTask.js";
|
|
3
|
+
import { NodeRenderGraphBlock } from "../nodeRenderGraphBlock.js";
|
|
4
|
+
/**
|
|
5
|
+
* Block that implements the lighting volume
|
|
6
|
+
*/
|
|
7
|
+
export declare class NodeRenderGraphLightingVolumeBlock extends NodeRenderGraphBlock {
|
|
8
|
+
protected _frameGraphTask: FrameGraphLightingVolumeTask;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the frame graph task associated with this block
|
|
11
|
+
*/
|
|
12
|
+
get task(): FrameGraphLightingVolumeTask;
|
|
13
|
+
/**
|
|
14
|
+
* Create a new NodeRenderGraphLightingVolumeBlock
|
|
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
|
+
/** Gets or sets the tesselation parameter */
|
|
21
|
+
get tesselation(): number;
|
|
22
|
+
set tesselation(value: number);
|
|
23
|
+
/** Gets or sets the refresh frequency parameter */
|
|
24
|
+
get frequency(): number;
|
|
25
|
+
set frequency(value: number);
|
|
26
|
+
/**
|
|
27
|
+
* Gets the current class name
|
|
28
|
+
* @returns the class name
|
|
29
|
+
*/
|
|
30
|
+
getClassName(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the shadow generator input component
|
|
33
|
+
*/
|
|
34
|
+
get shadowGenerator(): NodeRenderGraphConnectionPoint;
|
|
35
|
+
/**
|
|
36
|
+
* Gets the output component
|
|
37
|
+
*/
|
|
38
|
+
get output(): NodeRenderGraphConnectionPoint;
|
|
39
|
+
protected _buildBlock(state: NodeRenderGraphBuildState): void;
|
|
40
|
+
protected _dumpPropertiesCode(): string;
|
|
41
|
+
serialize(): any;
|
|
42
|
+
_deserialize(serializationObject: any): void;
|
|
43
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { __decorate } from "../../../tslib.es6.js";
|
|
2
|
+
import { FrameGraphLightingVolumeTask } from "../../Tasks/Misc/lightingVolumeTask.js";
|
|
3
|
+
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
4
|
+
import { editableInPropertyPage } from "../../../Decorators/nodeDecorator.js";
|
|
5
|
+
import { NodeRenderGraphBlock } from "../nodeRenderGraphBlock.js";
|
|
6
|
+
import { NodeRenderGraphBlockConnectionPointTypes } from "../Types/nodeRenderGraphTypes.js";
|
|
7
|
+
/**
|
|
8
|
+
* Block that implements the lighting volume
|
|
9
|
+
*/
|
|
10
|
+
export class NodeRenderGraphLightingVolumeBlock extends NodeRenderGraphBlock {
|
|
11
|
+
/**
|
|
12
|
+
* Gets the frame graph task associated with this block
|
|
13
|
+
*/
|
|
14
|
+
get task() {
|
|
15
|
+
return this._frameGraphTask;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create a new NodeRenderGraphLightingVolumeBlock
|
|
19
|
+
* @param name defines the block name
|
|
20
|
+
* @param frameGraph defines the hosting frame graph
|
|
21
|
+
* @param scene defines the hosting scene
|
|
22
|
+
*/
|
|
23
|
+
constructor(name, frameGraph, scene) {
|
|
24
|
+
super(name, frameGraph, scene);
|
|
25
|
+
this.registerInput("shadowGenerator", NodeRenderGraphBlockConnectionPointTypes.ShadowGenerator);
|
|
26
|
+
this._addDependenciesInput();
|
|
27
|
+
this.registerOutput("output", NodeRenderGraphBlockConnectionPointTypes.ObjectList);
|
|
28
|
+
this._frameGraphTask = new FrameGraphLightingVolumeTask(name, frameGraph);
|
|
29
|
+
}
|
|
30
|
+
/** Gets or sets the tesselation parameter */
|
|
31
|
+
get tesselation() {
|
|
32
|
+
return this._frameGraphTask.lightingVolume.tesselation;
|
|
33
|
+
}
|
|
34
|
+
set tesselation(value) {
|
|
35
|
+
this._frameGraphTask.lightingVolume.tesselation = value;
|
|
36
|
+
}
|
|
37
|
+
/** Gets or sets the refresh frequency parameter */
|
|
38
|
+
get frequency() {
|
|
39
|
+
return this._frameGraphTask.lightingVolume.frequency;
|
|
40
|
+
}
|
|
41
|
+
set frequency(value) {
|
|
42
|
+
this._frameGraphTask.lightingVolume.frequency = value;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Gets the current class name
|
|
46
|
+
* @returns the class name
|
|
47
|
+
*/
|
|
48
|
+
getClassName() {
|
|
49
|
+
return "NodeRenderGraphLightingVolumeBlock";
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Gets the shadow generator input component
|
|
53
|
+
*/
|
|
54
|
+
get shadowGenerator() {
|
|
55
|
+
return this._inputs[0];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Gets the output component
|
|
59
|
+
*/
|
|
60
|
+
get output() {
|
|
61
|
+
return this._outputs[0];
|
|
62
|
+
}
|
|
63
|
+
_buildBlock(state) {
|
|
64
|
+
super._buildBlock(state);
|
|
65
|
+
this.output.value = this._frameGraphTask.outputMeshLightingVolume;
|
|
66
|
+
this._frameGraphTask.shadowGenerator = this.shadowGenerator.connectedPoint?.value;
|
|
67
|
+
}
|
|
68
|
+
_dumpPropertiesCode() {
|
|
69
|
+
const codes = [];
|
|
70
|
+
codes.push(`${this._codeVariableName}.tesselation = ${this.tesselation};`);
|
|
71
|
+
codes.push(`${this._codeVariableName}.frequency = ${this.frequency};`);
|
|
72
|
+
return super._dumpPropertiesCode() + codes.join("\n");
|
|
73
|
+
}
|
|
74
|
+
serialize() {
|
|
75
|
+
const serializationObject = super.serialize();
|
|
76
|
+
serializationObject.tesselation = this.tesselation;
|
|
77
|
+
serializationObject.frequency = this.frequency;
|
|
78
|
+
return serializationObject;
|
|
79
|
+
}
|
|
80
|
+
_deserialize(serializationObject) {
|
|
81
|
+
super._deserialize(serializationObject);
|
|
82
|
+
this.tesselation = serializationObject.tesselation;
|
|
83
|
+
this.frequency = serializationObject.frequency;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
__decorate([
|
|
87
|
+
editableInPropertyPage("Tesselation", 2 /* PropertyTypeForEdition.Int */, "PROPERTIES", { min: 1, max: 4096 })
|
|
88
|
+
], NodeRenderGraphLightingVolumeBlock.prototype, "tesselation", null);
|
|
89
|
+
__decorate([
|
|
90
|
+
editableInPropertyPage("Refresh frequency", 2 /* PropertyTypeForEdition.Int */, "PROPERTIES")
|
|
91
|
+
], NodeRenderGraphLightingVolumeBlock.prototype, "frequency", null);
|
|
92
|
+
RegisterClass("BABYLON.NodeRenderGraphLightingVolumeBlock", NodeRenderGraphLightingVolumeBlock);
|
|
93
|
+
//# sourceMappingURL=lightingVolumeBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lightingVolumeBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/lightingVolumeBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,4BAA4B,EAAE,+CAAsD;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAA0B,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,wCAAwC,EAAE,MAAM,+BAA+B,CAAC;AAEzF;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,oBAAoB;IAG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":["import type { FrameGraph, FrameGraphShadowGeneratorTask, NodeRenderGraphBuildState, NodeRenderGraphConnectionPoint, Scene } from \"core/index\";\r\nimport { FrameGraphLightingVolumeTask } from \"core/FrameGraph/Tasks/Misc/lightingVolumeTask\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../Decorators/nodeDecorator\";\r\nimport { NodeRenderGraphBlock } from \"../nodeRenderGraphBlock\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../Types/nodeRenderGraphTypes\";\r\n\r\n/**\r\n * Block that implements the lighting volume\r\n */\r\nexport class NodeRenderGraphLightingVolumeBlock extends NodeRenderGraphBlock {\r\n protected override _frameGraphTask: FrameGraphLightingVolumeTask;\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 NodeRenderGraphLightingVolumeBlock\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(\"shadowGenerator\", NodeRenderGraphBlockConnectionPointTypes.ShadowGenerator);\r\n\r\n this._addDependenciesInput();\r\n\r\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\r\n\r\n this._frameGraphTask = new FrameGraphLightingVolumeTask(name, frameGraph);\r\n }\r\n\r\n /** Gets or sets the tesselation parameter */\r\n @editableInPropertyPage(\"Tesselation\", PropertyTypeForEdition.Int, \"PROPERTIES\", { min: 1, max: 4096 })\r\n public get tesselation(): number {\r\n return this._frameGraphTask.lightingVolume.tesselation;\r\n }\r\n\r\n public set tesselation(value: number) {\r\n this._frameGraphTask.lightingVolume.tesselation = value;\r\n }\r\n\r\n /** Gets or sets the refresh frequency parameter */\r\n @editableInPropertyPage(\"Refresh frequency\", PropertyTypeForEdition.Int, \"PROPERTIES\")\r\n public get frequency(): number {\r\n return this._frameGraphTask.lightingVolume.frequency;\r\n }\r\n\r\n public set frequency(value: number) {\r\n this._frameGraphTask.lightingVolume.frequency = 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 \"NodeRenderGraphLightingVolumeBlock\";\r\n }\r\n\r\n /**\r\n * Gets the shadow generator input component\r\n */\r\n public get shadowGenerator(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[0];\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 protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this.output.value = this._frameGraphTask.outputMeshLightingVolume;\r\n\r\n this._frameGraphTask.shadowGenerator = this.shadowGenerator.connectedPoint?.value as FrameGraphShadowGeneratorTask;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.tesselation = ${this.tesselation};`);\r\n codes.push(`${this._codeVariableName}.frequency = ${this.frequency};`);\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.tesselation = this.tesselation;\r\n serializationObject.frequency = this.frequency;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.tesselation = serializationObject.tesselation;\r\n this.frequency = serializationObject.frequency;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphLightingVolumeBlock\", NodeRenderGraphLightingVolumeBlock);\r\n"]}
|
|
@@ -103,13 +103,13 @@ export class FrameGraphRenderPass extends FrameGraphPass {
|
|
|
103
103
|
_execute() {
|
|
104
104
|
this._frameGraphRenderTarget =
|
|
105
105
|
this._frameGraphRenderTarget || this._context.createRenderTarget(this.name, this._renderTarget, this._renderTargetDepth, this.depthReadOnly, this.stencilReadOnly);
|
|
106
|
-
this._context.bindRenderTarget(this._frameGraphRenderTarget
|
|
106
|
+
this._context.bindRenderTarget(this._frameGraphRenderTarget);
|
|
107
107
|
super._execute();
|
|
108
108
|
this._context._flushDebugMessages();
|
|
109
109
|
const renderTargetWrapper = this._frameGraphRenderTarget.renderTargetWrapper;
|
|
110
110
|
if (renderTargetWrapper && (renderTargetWrapper.resolveMSAAColors || renderTargetWrapper.resolveMSAADepth || renderTargetWrapper.resolveMSAAStencil)) {
|
|
111
111
|
// Unbinding the render target will trigger resolving MSAA textures.
|
|
112
|
-
this._context.bindRenderTarget(undefined, `
|
|
112
|
+
this._context.bindRenderTarget(undefined, `Resolve MSAA${this.name ? " (" + this.name + ")" : ""}`, true);
|
|
113
113
|
this._context._flushDebugMessages();
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderPass.js","sourceRoot":"","sources":["../../../../../dev/core/src/FrameGraph/Passes/renderPass.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,cAAuC;IAO7E;;;;OAIG;IACI,MAAM,CAAC,YAAY,CAAC,IAAqB;QAC5C,OAAQ,IAA6B,CAAC,eAAe,KAAK,SAAS,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,iBAAiB;QACxB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,IAAW,sBAAsB;QAC7B,OAAO,IAAI,CAAC,uBAAuB,CAAC;IACxC,CAAC;IAYD,gBAAgB;IAChB,YAAY,IAAY,EAAE,UAA0B,EAAE,OAAgC,EAAE,MAAsB;QAC1G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AmB,CAAC,iBAAiB,IAAI,mBAAmB,CAAC,gBAAgB,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACnJ,oEAAoE;YACpE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,eAAe,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YAC1G,IAAI,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC;QACxC,CAAC;IACL,CAAC;IAED,gBAAgB;IACA,QAAQ;QACpB,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAChC,OAAO,MAAM;YACT,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,IAAI,CAAC,aAAa,KAAK,SAAS,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS;gBACxE,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,iEAAiE,CAAC;IAC9E,CAAC;IAED,gBAAgB;IACA,QAAQ;QACpB,IAAI,CAAC,uBAAuB,EAAE,OAAO,EAAE,CAAC;IAC5C,CAAC;CACJ","sourcesContent":["import type { Nullable, FrameGraphRenderContext, AbstractEngine, IFrameGraphPass, FrameGraphTextureHandle, FrameGraphTask, FrameGraphRenderTarget } from \"core/index\";\r\nimport { FrameGraphPass } from \"./pass\";\r\n\r\n/**\r\n * Render pass used to render objects.\r\n */\r\nexport class FrameGraphRenderPass extends FrameGraphPass<FrameGraphRenderContext> {\r\n protected readonly _engine: AbstractEngine;\r\n protected _renderTarget: FrameGraphTextureHandle | FrameGraphTextureHandle[] | undefined;\r\n protected _renderTargetDepth: FrameGraphTextureHandle | undefined;\r\n protected _frameGraphRenderTarget: FrameGraphRenderTarget | undefined;\r\n protected _dependencies: Set<FrameGraphTextureHandle> = new Set();\r\n\r\n /**\r\n * Checks if a pass is a render pass.\r\n * @param pass The pass to check.\r\n * @returns True if the pass is a render pass, else false.\r\n */\r\n public static IsRenderPass(pass: IFrameGraphPass): pass is FrameGraphRenderPass {\r\n return (pass as FrameGraphRenderPass).setRenderTarget !== undefined;\r\n }\r\n\r\n /**\r\n * Gets the handle(s) of the render target(s) used by the render pass.\r\n */\r\n public get renderTarget(): FrameGraphTextureHandle | FrameGraphTextureHandle[] | undefined {\r\n return this._renderTarget;\r\n }\r\n\r\n /**\r\n * Gets the handle of the render target depth used by the render pass.\r\n */\r\n public get renderTargetDepth(): FrameGraphTextureHandle | undefined {\r\n return this._renderTargetDepth;\r\n }\r\n\r\n /**\r\n * Gets the frame graph render target used by the render pass.\r\n */\r\n public get frameGraphRenderTarget(): FrameGraphRenderTarget | undefined {\r\n return this._frameGraphRenderTarget;\r\n }\r\n\r\n /**\r\n * If true, the depth attachment will be read-only (may allow some optimizations in WebGPU)\r\n */\r\n public depthReadOnly = false;\r\n\r\n /**\r\n * If true, the stencil attachment will be read-only (may allow some optimizations in WebGPU)\r\n */\r\n public stencilReadOnly = false;\r\n\r\n /** @internal */\r\n constructor(name: string, parentTask: FrameGraphTask, context: FrameGraphRenderContext, engine: AbstractEngine) {\r\n super(name, parentTask, context);\r\n this._engine = engine;\r\n }\r\n\r\n /**\r\n * Sets the render target(s) to use for rendering.\r\n * @param renderTargetHandle The render target to use for rendering, or an array of render targets to use for multi render target rendering.\r\n */\r\n public setRenderTarget(renderTargetHandle?: FrameGraphTextureHandle | FrameGraphTextureHandle[]) {\r\n this._renderTarget = renderTargetHandle;\r\n }\r\n\r\n /**\r\n * Sets the render target depth to use for rendering.\r\n * @param renderTargetHandle The render target depth to use for rendering.\r\n */\r\n public setRenderTargetDepth(renderTargetHandle?: FrameGraphTextureHandle) {\r\n this._renderTargetDepth = renderTargetHandle;\r\n }\r\n\r\n /**\r\n * Adds dependencies to the render pass.\r\n * @param dependencies The dependencies to add.\r\n */\r\n public addDependencies(dependencies?: FrameGraphTextureHandle | FrameGraphTextureHandle[]) {\r\n if (dependencies === undefined) {\r\n return;\r\n }\r\n\r\n if (Array.isArray(dependencies)) {\r\n for (const dependency of dependencies) {\r\n this._dependencies.add(dependency);\r\n }\r\n } else {\r\n this._dependencies.add(dependencies);\r\n }\r\n }\r\n\r\n /**\r\n * Collects the dependencies of the render pass.\r\n * @param dependencies The set of dependencies to update.\r\n */\r\n public collectDependencies(dependencies: Set<FrameGraphTextureHandle>): void {\r\n const iterator = this._dependencies.keys();\r\n for (let key = iterator.next(); key.done !== true; key = iterator.next()) {\r\n dependencies.add(key.value);\r\n }\r\n\r\n if (this._renderTarget !== undefined) {\r\n if (Array.isArray(this._renderTarget)) {\r\n for (const handle of this._renderTarget) {\r\n if (handle !== undefined) {\r\n dependencies.add(handle);\r\n }\r\n }\r\n } else {\r\n dependencies.add(this._renderTarget);\r\n }\r\n }\r\n\r\n if (this._renderTargetDepth !== undefined) {\r\n dependencies.add(this._renderTargetDepth);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public override _execute() {\r\n this._frameGraphRenderTarget =\r\n this._frameGraphRenderTarget || this._context.createRenderTarget(this.name, this._renderTarget, this._renderTargetDepth, this.depthReadOnly, this.stencilReadOnly);\r\n\r\n this._context.bindRenderTarget(this._frameGraphRenderTarget);\r\n\r\n super._execute();\r\n\r\n this._context._flushDebugMessages();\r\n\r\n const renderTargetWrapper = this._frameGraphRenderTarget.renderTargetWrapper;\r\n if (renderTargetWrapper && (renderTargetWrapper.resolveMSAAColors || renderTargetWrapper.resolveMSAADepth || renderTargetWrapper.resolveMSAAStencil)) {\r\n // Unbinding the render target will trigger resolving MSAA textures.\r\n this._context.bindRenderTarget(undefined, `Resolve MSAA${this.name ? \" (\" + this.name + \")\" : \"\"}`, true);\r\n this._context._flushDebugMessages();\r\n }\r\n }\r\n\r\n /** @internal */\r\n public override _isValid(): Nullable<string> {\r\n const errMsg = super._isValid();\r\n return errMsg\r\n ? errMsg\r\n : this._renderTarget !== undefined || this.renderTargetDepth !== undefined\r\n ? null\r\n : \"Render target and render target depth cannot both be undefined.\";\r\n }\r\n\r\n /** @internal */\r\n public override _dispose() {\r\n this._frameGraphRenderTarget?.dispose();\r\n }\r\n}\r\n"]}
|
|
@@ -14,6 +14,7 @@ declare class FrameGraphGlowBlurTask extends FrameGraphPostProcessTask {
|
|
|
14
14
|
* @param thinPostProcess The thin post process to use for the glow blur effect. If not provided, a new one will be created.
|
|
15
15
|
*/
|
|
16
16
|
constructor(name: string, frameGraph: FrameGraph, thinPostProcess?: ThinGlowBlurPostProcess);
|
|
17
|
+
getClassName(): string;
|
|
17
18
|
record(skipCreationOfDisabledPasses?: boolean, additionalExecute?: (context: FrameGraphRenderContext) => void, additionalBindings?: (context: FrameGraphRenderContext) => void): FrameGraphRenderPass;
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
@@ -78,6 +79,7 @@ export declare class FrameGraphBaseLayerTask extends FrameGraphTask {
|
|
|
78
79
|
*/
|
|
79
80
|
constructor(name: string, frameGraph: FrameGraph, scene: Scene, layer: ThinEffectLayer, numBlurPasses: number, useCustomBlur?: boolean, _setRenderTargetDepth?: boolean, _notifyBlurObservable?: boolean);
|
|
80
81
|
isReady(): boolean;
|
|
82
|
+
getClassName(): string;
|
|
81
83
|
record(): void;
|
|
82
84
|
private _clearAfterRenderingGroupObserver;
|
|
83
85
|
dispose(): void;
|
|
@@ -19,6 +19,9 @@ class FrameGraphGlowBlurTask extends FrameGraphPostProcessTask {
|
|
|
19
19
|
constructor(name, frameGraph, thinPostProcess) {
|
|
20
20
|
super(name, frameGraph, thinPostProcess || new ThinGlowBlurPostProcess(name, frameGraph.engine, new Vector2(1, 0), 1));
|
|
21
21
|
}
|
|
22
|
+
getClassName() {
|
|
23
|
+
return "FrameGraphGlowBlurTask";
|
|
24
|
+
}
|
|
22
25
|
record(skipCreationOfDisabledPasses = false, additionalExecute, additionalBindings) {
|
|
23
26
|
const pass = super.record(skipCreationOfDisabledPasses, additionalExecute, additionalBindings);
|
|
24
27
|
this.postProcess.textureWidth = this._outputWidth;
|
|
@@ -115,6 +118,9 @@ export class FrameGraphBaseLayerTask extends FrameGraphTask {
|
|
|
115
118
|
isReady() {
|
|
116
119
|
return this._objectRendererForLayer.isReady() && this.layer.isLayerReady();
|
|
117
120
|
}
|
|
121
|
+
getClassName() {
|
|
122
|
+
return "FrameGraphBaseLayerTask";
|
|
123
|
+
}
|
|
118
124
|
record() {
|
|
119
125
|
if (this.targetTexture === undefined || this.objectRendererTask === undefined) {
|
|
120
126
|
throw new Error(`${this.constructor.name} "${this.name}": targetTexture and objectRendererTask are required`);
|