@onerjs/core 8.53.5 → 8.53.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animations/animationGroup.d.ts +0 -1
- package/Animations/animationGroup.js +0 -1
- package/Animations/animationGroup.js.map +1 -1
- package/Animations/animationGroup.pure.js +2 -0
- package/Animations/animationGroup.pure.js.map +1 -1
- package/Animations/runtimeAnimation.js +11 -0
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Audio/audioSceneComponent.pure.js +1 -1
- package/AudioV2/abstractAudio/abstractSound.d.ts +2 -1
- package/AudioV2/abstractAudio/abstractSound.js +7 -2
- package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
- package/AudioV2/abstractAudio/abstractSoundInstance.d.ts +3 -1
- package/AudioV2/abstractAudio/abstractSoundInstance.js.map +1 -1
- package/AudioV2/abstractAudio/staticSound.d.ts +6 -0
- package/AudioV2/abstractAudio/staticSound.js +17 -1
- package/AudioV2/abstractAudio/staticSound.js.map +1 -1
- package/AudioV2/abstractAudio/staticSoundInstance.d.ts +4 -2
- package/AudioV2/abstractAudio/staticSoundInstance.js.map +1 -1
- package/AudioV2/abstractAudio/streamingSound.d.ts +6 -0
- package/AudioV2/abstractAudio/streamingSound.js +9 -1
- package/AudioV2/abstractAudio/streamingSound.js.map +1 -1
- package/AudioV2/webAudio/webAudioStaticSound.d.ts +7 -1
- package/AudioV2/webAudio/webAudioStaticSound.js +56 -8
- package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
- package/AudioV2/webAudio/webAudioStreamingSound.d.ts +3 -1
- package/AudioV2/webAudio/webAudioStreamingSound.js +16 -4
- package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
- package/BakedVertexAnimation/bakedVertexAnimationManager.d.ts +2 -2
- package/BakedVertexAnimation/bakedVertexAnimationManager.js +151 -121
- package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
- package/Behaviors/Cameras/interpolatingBehavior.d.ts +17 -2
- package/Behaviors/Cameras/interpolatingBehavior.js +53 -23
- package/Behaviors/Cameras/interpolatingBehavior.js.map +1 -1
- package/Bones/bone.pure.js +3 -3
- package/Buffers/buffer.pure.js +0 -12
- package/Buffers/buffer.pure.js.map +1 -1
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js +141 -126
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/BaseCameraPointersInput.d.ts +2 -1
- package/Cameras/Inputs/BaseCameraPointersInput.js +290 -277
- package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraGamepadInput.js +115 -102
- package/Cameras/Inputs/arcRotateCameraGamepadInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.d.ts +3 -0
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js +334 -273
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js +273 -258
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraPointersInput.js +237 -213
- package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraKeyboardInput.js +199 -168
- package/Cameras/Inputs/flyCameraKeyboardInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraMouseInput.js +243 -229
- package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js +311 -266
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.js +139 -119
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/followCameraPointersInput.js +239 -203
- package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraGamepadInput.js +127 -114
- package/Cameras/Inputs/freeCameraGamepadInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js +278 -244
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseInput.js +216 -202
- package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseWheelInput.js +368 -353
- package/Cameras/Inputs/freeCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraTouchInput.js +185 -172
- package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraKeyboardInput.d.ts +2 -0
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js +291 -246
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraPointersInput.d.ts +11 -1
- package/Cameras/Inputs/geospatialCameraPointersInput.js +18 -2
- package/Cameras/Inputs/geospatialCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/orbitCameraPointersInput.js +112 -96
- package/Cameras/Inputs/orbitCameraPointersInput.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.d.ts +0 -2
- package/Cameras/VR/vrExperienceHelper.js +0 -2
- package/Cameras/VR/vrExperienceHelper.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.pure.js +5 -0
- package/Cameras/VR/vrExperienceHelper.pure.js.map +1 -1
- package/Cameras/arcRotateCamera.pure.js +1559 -1479
- package/Cameras/arcRotateCamera.pure.js.map +1 -1
- package/Cameras/camera.pure.js +1225 -1178
- package/Cameras/camera.pure.js.map +1 -1
- package/Cameras/flyCamera.pure.js +369 -351
- package/Cameras/flyCamera.pure.js.map +1 -1
- package/Cameras/followCamera.pure.js +229 -192
- package/Cameras/followCamera.pure.js.map +1 -1
- package/Cameras/freeCamera.pure.js +373 -351
- package/Cameras/freeCamera.pure.js.map +1 -1
- package/Cameras/geospatialCamera.pure.d.ts +30 -7
- package/Cameras/geospatialCamera.pure.js +502 -457
- package/Cameras/geospatialCamera.pure.js.map +1 -1
- package/Cameras/geospatialCameraMovement.js +2 -2
- package/Cameras/geospatialCameraMovement.js.map +1 -1
- package/Cameras/targetCamera.pure.d.ts +7 -0
- package/Cameras/targetCamera.pure.js +550 -509
- package/Cameras/targetCamera.pure.js.map +1 -1
- package/Cameras/universalCamera.pure.js +98 -85
- package/Cameras/universalCamera.pure.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +111 -4
- package/Collisions/gpuPicker.js +696 -119
- package/Collisions/gpuPicker.js.map +1 -1
- package/Compute/computeShader.pure.js +372 -355
- package/Compute/computeShader.pure.js.map +1 -1
- package/Culling/Helper/transformFeedbackBoundingHelper.pure.js +2 -2
- package/Decorators/nodeDecorator.d.ts +11 -1
- package/Decorators/nodeDecorator.js +43 -6
- package/Decorators/nodeDecorator.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js +8 -0
- package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js.map +1 -1
- package/Engines/Native/nativeHelpers.js +15 -0
- package/Engines/Native/nativeHelpers.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +7 -2
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.d.ts +5 -0
- package/Engines/Native/nativeRenderTargetWrapper.js +35 -1
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/Processors/shaderProcessor.js +5 -3
- package/Engines/Processors/shaderProcessor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js +16 -3
- package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js.map +1 -1
- package/Engines/WebGPU/webgpuClearQuad.pure.js +7 -1
- package/Engines/WebGPU/webgpuClearQuad.pure.js.map +1 -1
- package/Engines/abstractEngine.functions.d.ts +8 -2
- package/Engines/abstractEngine.functions.js +12 -4
- package/Engines/abstractEngine.functions.js.map +1 -1
- package/Engines/abstractEngine.pure.d.ts +20 -1
- package/Engines/abstractEngine.pure.js +21 -134
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.d.ts +208 -0
- package/Engines/engine.pure.js +0 -15
- package/Engines/engine.pure.js.map +1 -1
- package/Engines/nullEngine.pure.d.ts +66 -0
- package/Engines/nullEngine.pure.js +97 -0
- package/Engines/nullEngine.pure.js.map +1 -1
- package/Engines/thinEngine.pure.d.ts +0 -13
- package/Engines/thinEngine.pure.js +4 -23
- package/Engines/thinEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.d.ts +0 -1
- package/Engines/thinNativeEngine.js +0 -1
- package/Engines/thinNativeEngine.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +27 -0
- package/Engines/thinNativeEngine.pure.js +383 -17
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +1 -0
- package/Engines/webgpuEngine.js +1 -0
- package/Engines/webgpuEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +9 -0
- package/Engines/webgpuEngine.pure.js +7 -0
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/flowGraph.js +9 -0
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphContext.js +597 -584
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphDataConnection.pure.d.ts +14 -0
- package/FlowGraph/flowGraphDataConnection.pure.js +38 -1
- package/FlowGraph/flowGraphDataConnection.pure.js.map +1 -1
- package/FlowGraph/serialization.d.ts +11 -0
- package/FlowGraph/serialization.js +11 -1
- package/FlowGraph/serialization.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js +182 -170
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js +196 -184
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js +222 -210
- package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +123 -111
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js +158 -146
- package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js +122 -110
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js +89 -77
- package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js +134 -122
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js +58 -46
- package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js +107 -95
- package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js +181 -169
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js +246 -234
- package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js +108 -96
- package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js +87 -75
- package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js +313 -301
- package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js +502 -490
- package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js +147 -135
- package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js +90 -78
- package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js +179 -167
- package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +462 -451
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +265 -253
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js +204 -192
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js +611 -550
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js +320 -308
- package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js +87 -75
- package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js +154 -142
- package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js +150 -138
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/inputBlock.pure.js +270 -256
- package/FrameGraph/Node/Blocks/inputBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js +95 -83
- package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraph.js +715 -693
- package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraphBlock.js +548 -533
- package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.d.ts +2 -2
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js +43 -51
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.d.ts +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.d.ts +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js +66 -35
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js.map +1 -1
- package/Helpers/environmentHelper.js +2 -2
- package/Helpers/environmentHelper.js.map +1 -1
- package/Layers/effectLayer.js +529 -519
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.pure.js +428 -413
- package/Layers/glowLayer.pure.js.map +1 -1
- package/Layers/highlightLayer.pure.js +473 -458
- package/Layers/highlightLayer.pure.js.map +1 -1
- package/Layers/selectionOutlineLayer.pure.js +360 -345
- package/Layers/selectionOutlineLayer.pure.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.pure.d.ts +1 -1
- package/Lights/Clustered/clusteredLightContainer.pure.js +583 -558
- package/Lights/Clustered/clusteredLightContainer.pure.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +6 -1
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/areaLight.pure.js +61 -39
- package/Lights/areaLight.pure.js.map +1 -1
- package/Lights/directionalLight.pure.js +308 -284
- package/Lights/directionalLight.pure.js.map +1 -1
- package/Lights/hemisphericLight.pure.js +123 -104
- package/Lights/hemisphericLight.pure.js.map +1 -1
- package/Lights/light.d.ts +5 -3
- package/Lights/light.js +869 -827
- package/Lights/light.js.map +1 -1
- package/Lights/pointLight.pure.js +185 -174
- package/Lights/pointLight.pure.js.map +1 -1
- package/Lights/rectAreaLight.pure.d.ts +17 -0
- package/Lights/rectAreaLight.pure.js +238 -159
- package/Lights/rectAreaLight.pure.js.map +1 -1
- package/Lights/shadowLight.js +280 -268
- package/Lights/shadowLight.js.map +1 -1
- package/Lights/spotLight.pure.js +460 -427
- package/Lights/spotLight.pure.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.pure.js +17 -5
- package/Loading/Plugins/babylonFileLoader.pure.js.map +1 -1
- package/Loading/sceneLoader.d.ts +5 -1
- package/Loading/sceneLoader.js +299 -402
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Background/backgroundMaterial.pure.d.ts +18 -18
- package/Materials/Background/backgroundMaterial.pure.js +949 -794
- package/Materials/Background/backgroundMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.d.ts +15 -0
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +34 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.d.ts +9 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +26 -2
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.d.ts +2 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js +169 -149
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js +442 -429
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js +396 -383
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js +237 -220
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/textureBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js +150 -133
- package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js +265 -250
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js +159 -142
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js +214 -201
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js +419 -400
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js +3 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js +302 -289
- package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +1327 -1272
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js +352 -337
- package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/refractionBlock.pure.js +297 -277
- package/Materials/Node/Blocks/PBR/refractionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/sheenBlock.pure.js +146 -131
- package/Materials/Node/Blocks/PBR/sheenBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js +158 -145
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/clampBlock.pure.js +92 -77
- package/Materials/Node/Blocks/clampBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/cloudBlock.pure.js +145 -132
- package/Materials/Node/Blocks/cloudBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/conditionalBlock.pure.js +182 -169
- package/Materials/Node/Blocks/conditionalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/curveBlock.pure.js +259 -246
- package/Materials/Node/Blocks/curveBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/debugBlock.pure.js +119 -106
- package/Materials/Node/Blocks/debugBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/loopBlock.pure.js +123 -110
- package/Materials/Node/Blocks/loopBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js +185 -172
- package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/remapBlock.pure.js +127 -112
- package/Materials/Node/Blocks/remapBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/transformBlock.pure.js +196 -185
- package/Materials/Node/Blocks/transformBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.pure.js +451 -438
- package/Materials/Node/Blocks/triPlanarBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/trigonometryBlock.pure.js +184 -171
- package/Materials/Node/Blocks/trigonometryBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/waveBlock.pure.js +97 -84
- package/Materials/Node/Blocks/waveBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js +276 -263
- package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js.map +1 -1
- package/Materials/Node/nodeMaterial.pure.js +1765 -1737
- package/Materials/Node/nodeMaterial.pure.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +3 -3
- package/Materials/PBR/openpbrMaterial.pure.d.ts +102 -102
- package/Materials/PBR/openpbrMaterial.pure.js +3115 -2243
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrAnisotropicConfiguration.d.ts +3 -3
- package/Materials/PBR/pbrAnisotropicConfiguration.js +255 -227
- package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
- package/Materials/PBR/pbrBRDFConfiguration.d.ts +9 -9
- package/Materials/PBR/pbrBRDFConfiguration.js +203 -155
- package/Materials/PBR/pbrBRDFConfiguration.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.js +1751 -1736
- package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseSimpleMaterial.d.ts +13 -13
- package/Materials/PBR/pbrBaseSimpleMaterial.js +205 -117
- package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
- package/Materials/PBR/pbrClearCoatConfiguration.d.ts +9 -9
- package/Materials/PBR/pbrClearCoatConfiguration.js +464 -406
- package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
- package/Materials/PBR/pbrIridescenceConfiguration.d.ts +3 -3
- package/Materials/PBR/pbrIridescenceConfiguration.js +271 -239
- package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
- package/Materials/PBR/pbrMaterial.pure.d.ts +66 -66
- package/Materials/PBR/pbrMaterial.pure.js +1041 -685
- package/Materials/PBR/pbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.d.ts +5 -5
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js +176 -115
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrSheenConfiguration.d.ts +7 -7
- package/Materials/PBR/pbrSheenConfiguration.js +314 -270
- package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.d.ts +5 -5
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js +172 -117
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrSubSurfaceConfiguration.d.ts +16 -16
- package/Materials/PBR/pbrSubSurfaceConfiguration.js +864 -764
- package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.d.ts +43 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js +64 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js.map +1 -0
- package/Materials/Textures/HTML/htmlInteractionManager.d.ts +69 -0
- package/Materials/Textures/HTML/htmlInteractionManager.js +130 -0
- package/Materials/Textures/HTML/htmlInteractionManager.js.map +1 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.d.ts +84 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.js +246 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.js.map +1 -0
- package/Materials/Textures/HTML/htmlTexture.d.ts +148 -0
- package/Materials/Textures/HTML/htmlTexture.js +455 -0
- package/Materials/Textures/HTML/htmlTexture.js.map +1 -0
- package/Materials/Textures/HTML/index.d.ts +4 -0
- package/Materials/Textures/HTML/index.js +5 -0
- package/Materials/Textures/HTML/index.js.map +1 -0
- package/Materials/Textures/HTML/pure.d.ts +5 -0
- package/Materials/Textures/HTML/pure.js +6 -0
- package/Materials/Textures/HTML/pure.js.map +1 -0
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js +671 -643
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
- package/Materials/Textures/baseTexture.pure.js +880 -825
- package/Materials/Textures/baseTexture.pure.js.map +1 -1
- package/Materials/Textures/cubeTexture.d.ts +0 -1
- package/Materials/Textures/cubeTexture.js +0 -1
- package/Materials/Textures/cubeTexture.js.map +1 -1
- package/Materials/Textures/cubeTexture.pure.js +368 -333
- package/Materials/Textures/cubeTexture.pure.js.map +1 -1
- package/Materials/Textures/dynamicTexture.d.ts +0 -1
- package/Materials/Textures/dynamicTexture.js +0 -1
- package/Materials/Textures/dynamicTexture.js.map +1 -1
- package/Materials/Textures/dynamicTexture.pure.js +2 -0
- package/Materials/Textures/dynamicTexture.pure.js.map +1 -1
- package/Materials/Textures/htmlElementTexture.d.ts +0 -2
- package/Materials/Textures/htmlElementTexture.js +0 -2
- package/Materials/Textures/htmlElementTexture.js.map +1 -1
- package/Materials/Textures/htmlElementTexture.pure.js +4 -0
- package/Materials/Textures/htmlElementTexture.pure.js.map +1 -1
- package/Materials/Textures/index.d.ts +1 -0
- package/Materials/Textures/index.js +1 -1
- package/Materials/Textures/index.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.d.ts +0 -1
- package/Materials/Textures/multiRenderTarget.js +0 -1
- package/Materials/Textures/multiRenderTarget.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.pure.js +2 -0
- package/Materials/Textures/multiRenderTarget.pure.js.map +1 -1
- package/Materials/Textures/pure.d.ts +1 -0
- package/Materials/Textures/pure.js +1 -0
- package/Materials/Textures/pure.js.map +1 -1
- package/Materials/Textures/texture.pure.js +961 -923
- package/Materials/Textures/texture.pure.js.map +1 -1
- package/Materials/Textures/videoTexture.pure.d.ts +3 -0
- package/Materials/Textures/videoTexture.pure.js +450 -401
- package/Materials/Textures/videoTexture.pure.js.map +1 -1
- package/Materials/colorCurves.pure.js +510 -477
- package/Materials/colorCurves.pure.js.map +1 -1
- package/Materials/effect.pure.js +0 -7
- package/Materials/effect.pure.js.map +1 -1
- package/Materials/imageProcessing.js +12 -4
- package/Materials/imageProcessing.js.map +1 -1
- package/Materials/imageProcessingConfiguration.pure.js +647 -587
- package/Materials/imageProcessingConfiguration.pure.js.map +1 -1
- package/Materials/material.decalMapConfiguration.pure.d.ts +2 -2
- package/Materials/material.decalMapConfiguration.pure.js +149 -130
- package/Materials/material.decalMapConfiguration.pure.js.map +1 -1
- package/Materials/material.detailMapConfiguration.d.ts +3 -3
- package/Materials/material.detailMapConfiguration.js +213 -175
- package/Materials/material.detailMapConfiguration.js.map +1 -1
- package/Materials/material.pure.js +1815 -1721
- package/Materials/material.pure.js.map +1 -1
- package/Materials/materialPluginBase.pure.js +270 -249
- package/Materials/materialPluginBase.pure.js.map +1 -1
- package/Materials/materialPluginManager.pure.js +18 -8
- package/Materials/materialPluginManager.pure.js.map +1 -1
- package/Materials/materialStencilState.js +211 -200
- package/Materials/materialStencilState.js.map +1 -1
- package/Materials/meshDebugPluginMaterial.pure.d.ts +2 -2
- package/Materials/meshDebugPluginMaterial.pure.js +397 -275
- package/Materials/meshDebugPluginMaterial.pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +32 -32
- package/Materials/standardMaterial.pure.js +1804 -1394
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Maths/math.color.pure.js +5 -5
- package/Maths/math.functions.js +38 -30
- package/Maths/math.functions.js.map +1 -1
- package/Maths/math.vector.pure.js +25 -25
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +18 -8
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +86 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +255 -104
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.d.ts +39 -0
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js +322 -0
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js.map +1 -0
- package/Meshes/GreasedLine/greasedLineMesh.pure.js +4 -4
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +3 -3
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js +107 -94
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js +276 -263
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js +247 -232
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js +299 -284
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js +196 -181
- package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/latticeBlock.pure.js +198 -179
- package/Meshes/Node/Blocks/Set/latticeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js +151 -138
- package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js +107 -94
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js +138 -125
- package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js +213 -200
- package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js +138 -125
- package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js +179 -164
- package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/boxBlock.pure.js +183 -170
- package/Meshes/Node/Blocks/Sources/boxBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js +125 -112
- package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js +153 -140
- package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/discBlock.pure.js +112 -99
- package/Meshes/Node/Blocks/Sources/discBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/gridBlock.pure.js +133 -120
- package/Meshes/Node/Blocks/Sources/gridBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js +128 -115
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/meshBlock.pure.js +116 -103
- package/Meshes/Node/Blocks/Sources/meshBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/planeBlock.pure.js +160 -147
- package/Meshes/Node/Blocks/Sources/planeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js +144 -131
- package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/torusBlock.pure.js +112 -99
- package/Meshes/Node/Blocks/Sources/torusBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js +200 -185
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/bevelBlock.pure.js +111 -98
- package/Meshes/Node/Blocks/bevelBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +182 -165
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js +89 -76
- package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/conditionBlock.pure.js +184 -169
- package/Meshes/Node/Blocks/conditionBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js +270 -255
- package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js +172 -159
- package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCurveBlock.pure.js +230 -217
- package/Meshes/Node/Blocks/geometryCurveBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryEaseBlock.pure.js +256 -245
- package/Meshes/Node/Blocks/geometryEaseBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js +206 -189
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTransformBlock.pure.js +166 -153
- package/Meshes/Node/Blocks/geometryTransformBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js +221 -208
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mappingBlock.pure.js +150 -137
- package/Meshes/Node/Blocks/mappingBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mathBlock.pure.js +269 -256
- package/Meshes/Node/Blocks/mathBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js +141 -128
- package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/randomBlock.pure.js +161 -148
- package/Meshes/Node/Blocks/randomBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/subdivideBlock.pure.js +102 -87
- package/Meshes/Node/Blocks/subdivideBlock.pure.js.map +1 -1
- package/Meshes/Node/nodeGeometry.js +560 -538
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlock.js +473 -458
- package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
- package/Meshes/abstractMesh.pure.js +2218 -2207
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/geometry.js +30 -15
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/mesh.pure.js +26 -14
- package/Meshes/mesh.pure.js.map +1 -1
- package/Meshes/mesh.vertexData.js +1665 -1655
- package/Meshes/mesh.vertexData.js.map +1 -1
- package/Meshes/transformNode.pure.js +1400 -1372
- package/Meshes/transformNode.pure.js.map +1 -1
- package/Misc/decorators.d.ts +34 -19
- package/Misc/decorators.functions.d.ts +33 -2
- package/Misc/decorators.functions.js +114 -35
- package/Misc/decorators.functions.js.map +1 -1
- package/Misc/decorators.js +96 -68
- package/Misc/decorators.js.map +1 -1
- package/Misc/decorators.serialization.js +47 -40
- package/Misc/decorators.serialization.js.map +1 -1
- package/Misc/decorators.serializationUtilities.d.ts +24 -0
- package/Misc/decorators.serializationUtilities.js +20 -0
- package/Misc/decorators.serializationUtilities.js.map +1 -0
- package/Misc/dumpTools.pure.js +43 -33
- package/Misc/dumpTools.pure.js.map +1 -1
- package/Misc/fileTools.pure.js +8 -0
- package/Misc/fileTools.pure.js.map +1 -1
- package/Misc/observable.pure.js +0 -7
- package/Misc/observable.pure.js.map +1 -1
- package/Misc/snapshotRenderingHelper.d.ts +4 -1
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Misc/symbolMetadataPolyfill.d.ts +11 -0
- package/Misc/symbolMetadataPolyfill.js +22 -0
- package/Misc/symbolMetadataPolyfill.js.map +1 -0
- package/Misc/tools.pure.js +2 -2
- package/Misc/tools.pure.js.map +1 -1
- package/Morph/morphTarget.js +382 -365
- package/Morph/morphTarget.js.map +1 -1
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js +160 -145
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js +187 -174
- package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js +238 -219
- package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js +140 -115
- package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js +157 -144
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js +133 -119
- package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js +93 -80
- package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleDebugBlock.pure.js +117 -105
- package/Particles/Node/Blocks/particleDebugBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js +105 -92
- package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleGradientValueBlock.pure.js +82 -69
- package/Particles/Node/Blocks/particleGradientValueBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js +113 -101
- package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js +278 -265
- package/Particles/Node/Blocks/particleMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleNumberMathBlock.pure.js +155 -142
- package/Particles/Node/Blocks/particleNumberMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleRandomBlock.pure.js +156 -143
- package/Particles/Node/Blocks/particleRandomBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js +217 -204
- package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleVectorMathBlock.pure.js +106 -93
- package/Particles/Node/Blocks/particleVectorMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/systemBlock.pure.js +366 -330
- package/Particles/Node/Blocks/systemBlock.pure.js.map +1 -1
- package/Particles/Node/nodeParticleBlock.js +339 -324
- package/Particles/Node/nodeParticleBlock.js.map +1 -1
- package/Particles/Node/nodeParticleSystemSet.js +494 -473
- package/Particles/Node/nodeParticleSystemSet.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +0 -1
- package/Particles/gpuParticleSystem.js +0 -1
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +4 -3
- package/Particles/gpuParticleSystem.pure.js +27 -16
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Particles/particleSystem.pure.js +57 -2
- package/Particles/particleSystem.pure.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +0 -1
- package/Particles/thinParticleSystem.js +0 -1
- package/Particles/thinParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.pure.js +2 -0
- package/Particles/thinParticleSystem.pure.js.map +1 -1
- package/Particles/webgl2ParticleSystem.pure.js +2 -0
- package/Particles/webgl2ParticleSystem.pure.js.map +1 -1
- package/Physics/v1/physicsImpostor.pure.js +4 -4
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js +675 -656
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.d.ts +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js +521 -486
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.d.ts +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js +241 -220
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js +852 -835
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js +1135 -1073
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js +319 -303
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js +212 -199
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
- package/PostProcesses/blackAndWhitePostProcess.pure.js +67 -55
- package/PostProcesses/blackAndWhitePostProcess.pure.js.map +1 -1
- package/PostProcesses/bloomMergePostProcess.pure.js +74 -62
- package/PostProcesses/bloomMergePostProcess.pure.js.map +1 -1
- package/PostProcesses/blurPostProcess.pure.js +127 -115
- package/PostProcesses/blurPostProcess.pure.js.map +1 -1
- package/PostProcesses/chromaticAberrationPostProcess.pure.js +130 -118
- package/PostProcesses/chromaticAberrationPostProcess.pure.js.map +1 -1
- package/PostProcesses/circleOfConfusionPostProcess.pure.js +115 -104
- package/PostProcesses/circleOfConfusionPostProcess.pure.js.map +1 -1
- package/PostProcesses/colorCorrectionPostProcess.pure.js +55 -43
- package/PostProcesses/colorCorrectionPostProcess.pure.js.map +1 -1
- package/PostProcesses/convolutionPostProcess.pure.js +96 -84
- package/PostProcesses/convolutionPostProcess.pure.js.map +1 -1
- package/PostProcesses/extractHighlightsPostProcess.pure.js +68 -57
- package/PostProcesses/extractHighlightsPostProcess.pure.js.map +1 -1
- package/PostProcesses/filterPostProcess.pure.js +66 -54
- package/PostProcesses/filterPostProcess.pure.js.map +1 -1
- package/PostProcesses/fxaaPostProcess.pure.js.map +1 -1
- package/PostProcesses/grainPostProcess.pure.js +82 -70
- package/PostProcesses/grainPostProcess.pure.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.js +334 -322
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.pure.js +246 -235
- package/PostProcesses/motionBlurPostProcess.pure.js.map +1 -1
- package/PostProcesses/passPostProcess.pure.js +75 -63
- package/PostProcesses/passPostProcess.pure.js.map +1 -1
- package/PostProcesses/postProcess.pure.js +899 -835
- package/PostProcesses/postProcess.pure.js.map +1 -1
- package/PostProcesses/refractionPostProcess.pure.js +114 -87
- package/PostProcesses/refractionPostProcess.pure.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js +108 -96
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.pure.js +241 -220
- package/PostProcesses/screenSpaceReflectionPostProcess.pure.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js +86 -74
- package/PostProcesses/sharpenPostProcess.pure.js.map +1 -1
- package/PostProcesses/tonemapPostProcess.pure.js +82 -70
- package/PostProcesses/tonemapPostProcess.pure.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js +500 -465
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js.map +1 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.d.ts +0 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.js +0 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.js.map +1 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js +2 -0
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js.map +1 -1
- package/Probes/reflectionProbe.pure.js +238 -224
- package/Probes/reflectionProbe.pure.js.map +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.pure.d.ts +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.pure.js +138 -105
- package/Rendering/GlobalIllumination/giRSMManager.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.d.ts +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js +155 -138
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.d.ts +0 -2
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +0 -2
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +5 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.d.ts +0 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +0 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +1 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +34 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/edgesRenderer.pure.js.map +1 -1
- package/Rendering/prePassRenderer.d.ts +0 -2
- package/Rendering/prePassRenderer.js +0 -2
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Rendering/prePassRenderer.pure.js +2 -0
- package/Rendering/prePassRenderer.pure.js.map +1 -1
- package/Rendering/reflectiveShadowMap.pure.d.ts +1 -1
- package/Rendering/reflectiveShadowMap.pure.js +151 -130
- package/Rendering/reflectiveShadowMap.pure.js.map +1 -1
- package/Rendering/thinDepthPeelingRenderer.d.ts +0 -1
- package/Rendering/thinDepthPeelingRenderer.js +0 -1
- package/Rendering/thinDepthPeelingRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js +1 -0
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +35 -5
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/Shaders/gaussianSplatting.fragment.js +17 -1
- package/Shaders/gaussianSplatting.fragment.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +1 -1
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/gaussianSplattingDepth.vertex.js +1 -1
- package/Shaders/gaussianSplattingDepth.vertex.js.map +1 -1
- package/Shaders/picking.fragment.js +39 -3
- package/Shaders/picking.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +3 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/helperFunctions.js +2 -2
- package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +39 -7
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +4 -3
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.fragment.js +14 -1
- package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +2 -2
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -2
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
- package/ShadersWGSL/lightingVolume.compute.js +2 -2
- package/ShadersWGSL/lightingVolume.compute.js.map +1 -1
- package/ShadersWGSL/picking.fragment.js +22 -1
- package/ShadersWGSL/picking.fragment.js.map +1 -1
- package/XR/features/Layers/WebXRCompositionLayer.d.ts +3 -2
- package/XR/features/Layers/WebXRCompositionLayer.js +2 -2
- package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -1
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +59 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js +120 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.d.ts +25 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.js +69 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.js.map +1 -0
- package/XR/features/WebXRLayers.pure.d.ts +8 -0
- package/XR/features/WebXRLayers.pure.js +43 -6
- package/XR/features/WebXRLayers.pure.js.map +1 -1
- package/XR/native/nativeXRRenderTarget.d.ts +2 -2
- package/XR/native/nativeXRRenderTarget.js +2 -2
- package/XR/native/nativeXRRenderTarget.js.map +1 -1
- package/XR/webXRExperienceHelper.js +10 -1
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/XR/webXRGraphicsBinding.d.ts +90 -0
- package/XR/webXRGraphicsBinding.js +85 -0
- package/XR/webXRGraphicsBinding.js.map +1 -0
- package/XR/webXRLayerRenderTargetTexture.d.ts +24 -0
- package/XR/webXRLayerRenderTargetTexture.js +30 -0
- package/XR/webXRLayerRenderTargetTexture.js.map +1 -0
- package/XR/webXRManagedOutputCanvas.d.ts +14 -0
- package/XR/webXRManagedOutputCanvas.js +24 -5
- package/XR/webXRManagedOutputCanvas.js.map +1 -1
- package/XR/webXRRenderTargetTextureProvider.d.ts +25 -4
- package/XR/webXRRenderTargetTextureProvider.js +33 -35
- package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRSessionManager.d.ts +11 -0
- package/XR/webXRSessionManager.js +37 -0
- package/XR/webXRSessionManager.js.map +1 -1
- package/XR/webXRTypes.d.ts +9 -6
- package/XR/webXRTypes.js.map +1 -1
- package/XR/webXRWebGLLayer.d.ts +2 -2
- package/XR/webXRWebGLLayer.js +2 -2
- package/XR/webXRWebGLLayer.js.map +1 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.d.ts +12 -0
- package/XR/webXRWebGLRenderTargetTextureProvider.js +58 -0
- package/XR/webXRWebGLRenderTargetTextureProvider.js.map +1 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +69 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.js +148 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/node.js +878 -845
- package/node.js.map +1 -1
- package/package.json +8 -14
- package/scene.pure.d.ts +12 -0
- package/scene.pure.js +36 -0
- package/scene.pure.js.map +1 -1
- package/tslib.es6.js +304 -150
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** This file must only contain pure code and pure imports */
|
|
2
|
-
import {
|
|
2
|
+
import { __esDecorate, __runInitializers } from "../../../tslib.es6.js";
|
|
3
3
|
import { serialize } from "../../../Misc/decorators.js";
|
|
4
4
|
import { SerializationHelper } from "../../../Misc/decorators.serialization.js";
|
|
5
5
|
import { PostProcess } from "../../postProcess.pure.js";
|
|
@@ -31,863 +31,880 @@ import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
|
31
31
|
* - computation of blur radius from roughness and distance: https://github.com/godotengine/godot/blob/master/servers/rendering/renderer_rd/shaders/effects/screen_space_reflection.glsl
|
|
32
32
|
* - blur and usage of back depth buffer: https://github.com/kode80/kode80SSR
|
|
33
33
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
set strength(strength) {
|
|
88
|
-
this._thinSSRRenderingPipeline.strength = strength;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Gets or sets the falloff exponent used to compute the reflection strength. Higher values lead to fainter reflections (default: 1).
|
|
92
|
-
*/
|
|
93
|
-
get reflectionSpecularFalloffExponent() {
|
|
94
|
-
return this._thinSSRRenderingPipeline.reflectionSpecularFalloffExponent;
|
|
95
|
-
}
|
|
96
|
-
set reflectionSpecularFalloffExponent(exponent) {
|
|
97
|
-
this._thinSSRRenderingPipeline.reflectionSpecularFalloffExponent = exponent;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Maximum number of steps during the ray marching process after which we consider an intersection could not be found (default: 1000).
|
|
101
|
-
* Should be an integer value.
|
|
102
|
-
*/
|
|
103
|
-
get maxSteps() {
|
|
104
|
-
return this._thinSSRRenderingPipeline.maxSteps;
|
|
105
|
-
}
|
|
106
|
-
set maxSteps(steps) {
|
|
107
|
-
this._thinSSRRenderingPipeline.maxSteps = steps;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Gets or sets the factor applied when computing roughness. Default value is 0.2.
|
|
111
|
-
* When blurring based on roughness is enabled (meaning blurDispersionStrength \> 0), roughnessFactor is used as a global roughness factor applied on all objects.
|
|
112
|
-
* If you want to disable this global roughness set it to 0.
|
|
113
|
-
*/
|
|
114
|
-
get roughnessFactor() {
|
|
115
|
-
return this._thinSSRRenderingPipeline.roughnessFactor;
|
|
116
|
-
}
|
|
117
|
-
set roughnessFactor(factor) {
|
|
118
|
-
this._thinSSRRenderingPipeline.roughnessFactor = factor;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Number of steps to skip at start when marching the ray to avoid self collisions (default: 1)
|
|
122
|
-
* 1 should normally be a good value, depending on the scene you may need to use a higher value (2 or 3)
|
|
123
|
-
*/
|
|
124
|
-
get selfCollisionNumSkip() {
|
|
125
|
-
return this._thinSSRRenderingPipeline.selfCollisionNumSkip;
|
|
126
|
-
}
|
|
127
|
-
set selfCollisionNumSkip(skip) {
|
|
128
|
-
this._thinSSRRenderingPipeline.selfCollisionNumSkip = skip;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Gets or sets the minimum value for one of the reflectivity component of the material to consider it for SSR (default: 0.04).
|
|
132
|
-
* If all r/g/b components of the reflectivity is below or equal this value, the pixel will not be considered reflective and SSR won't be applied.
|
|
133
|
-
*/
|
|
134
|
-
get reflectivityThreshold() {
|
|
135
|
-
return this._thinSSRRenderingPipeline.reflectivityThreshold;
|
|
136
|
-
}
|
|
137
|
-
set reflectivityThreshold(threshold) {
|
|
138
|
-
const currentThreshold = this.reflectivityThreshold;
|
|
139
|
-
if (threshold === currentThreshold) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
this._thinSSRRenderingPipeline.reflectivityThreshold = threshold;
|
|
143
|
-
if ((threshold === 0 && currentThreshold !== 0) || (threshold !== 0 && currentThreshold === 0)) {
|
|
144
|
-
this._buildPipeline();
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Gets or sets the downsample factor used to reduce the size of the texture used to compute the SSR contribution (default: 0).
|
|
149
|
-
* Use 0 to render the SSR contribution at full resolution, 1 to render at half resolution, 2 to render at 1/3 resolution, etc.
|
|
150
|
-
* Note that it is used only when blurring is enabled (blurDispersionStrength \> 0), because in that mode the SSR contribution is generated in a separate texture.
|
|
151
|
-
*/
|
|
152
|
-
get ssrDownsample() {
|
|
153
|
-
return this._thinSSRRenderingPipeline.ssrDownsample;
|
|
154
|
-
}
|
|
155
|
-
set ssrDownsample(downsample) {
|
|
156
|
-
this._thinSSRRenderingPipeline.ssrDownsample = downsample;
|
|
157
|
-
this._buildPipeline();
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Gets or sets the blur dispersion strength. Set this value to 0 to disable blurring (default: 0.03)
|
|
161
|
-
* The reflections are blurred based on the roughness of the surface and the distance between the pixel shaded and the reflected pixel: the higher the distance the more blurry the reflection is.
|
|
162
|
-
* blurDispersionStrength allows to increase or decrease this effect.
|
|
163
|
-
*/
|
|
164
|
-
get blurDispersionStrength() {
|
|
165
|
-
return this._thinSSRRenderingPipeline.blurDispersionStrength;
|
|
166
|
-
}
|
|
167
|
-
set blurDispersionStrength(strength) {
|
|
168
|
-
const currentStrength = this.blurDispersionStrength;
|
|
169
|
-
if (strength === currentStrength) {
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
this._thinSSRRenderingPipeline.blurDispersionStrength = strength;
|
|
173
|
-
if ((strength === 0 && currentStrength !== 0) || (strength !== 0 && currentStrength === 0)) {
|
|
174
|
-
this._buildPipeline();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
_useBlur() {
|
|
178
|
-
return this.blurDispersionStrength > 0;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Gets or sets the downsample factor used to reduce the size of the textures used to blur the reflection effect (default: 0).
|
|
182
|
-
* Use 0 to blur at full resolution, 1 to render at half resolution, 2 to render at 1/3 resolution, etc.
|
|
183
|
-
*/
|
|
184
|
-
get blurDownsample() {
|
|
185
|
-
return this._thinSSRRenderingPipeline.blurDownsample;
|
|
186
|
-
}
|
|
187
|
-
set blurDownsample(downsample) {
|
|
188
|
-
this._thinSSRRenderingPipeline.blurDownsample = downsample;
|
|
189
|
-
this._buildPipeline();
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Gets or sets whether or not smoothing reflections is enabled (default: false)
|
|
193
|
-
* Enabling smoothing will require more GPU power.
|
|
194
|
-
* Note that this setting has no effect if step = 1: it's only used if step \> 1.
|
|
195
|
-
*/
|
|
196
|
-
get enableSmoothReflections() {
|
|
197
|
-
return this._thinSSRRenderingPipeline.enableSmoothReflections;
|
|
198
|
-
}
|
|
199
|
-
set enableSmoothReflections(enabled) {
|
|
200
|
-
this._thinSSRRenderingPipeline.enableSmoothReflections = enabled;
|
|
201
|
-
}
|
|
202
|
-
get _useScreenspaceDepth() {
|
|
203
|
-
return this._thinSSRRenderingPipeline.useScreenspaceDepth;
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Gets or sets the environment cube texture used to define the reflection when the reflected rays of SSR leave the view space or when the maxDistance/maxSteps is reached.
|
|
207
|
-
*/
|
|
208
|
-
get environmentTexture() {
|
|
209
|
-
return this._thinSSRRenderingPipeline.environmentTexture;
|
|
210
|
-
}
|
|
211
|
-
set environmentTexture(texture) {
|
|
212
|
-
this._thinSSRRenderingPipeline.environmentTexture = texture;
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Gets or sets the boolean defining if the environment texture is a standard cubemap (false) or a probe (true). Default value is false.
|
|
216
|
-
* Note: a probe cube texture is treated differently than an ordinary cube texture because the Y axis is reversed.
|
|
217
|
-
*/
|
|
218
|
-
get environmentTextureIsProbe() {
|
|
219
|
-
return this._thinSSRRenderingPipeline.environmentTextureIsProbe;
|
|
220
|
-
}
|
|
221
|
-
set environmentTextureIsProbe(isProbe) {
|
|
222
|
-
this._thinSSRRenderingPipeline.environmentTextureIsProbe = isProbe;
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Gets or sets a boolean indicating if the reflections should be attenuated at the screen borders (default: true).
|
|
226
|
-
*/
|
|
227
|
-
get attenuateScreenBorders() {
|
|
228
|
-
return this._thinSSRRenderingPipeline.attenuateScreenBorders;
|
|
229
|
-
}
|
|
230
|
-
set attenuateScreenBorders(attenuate) {
|
|
231
|
-
this._thinSSRRenderingPipeline.attenuateScreenBorders = attenuate;
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Gets or sets a boolean indicating if the reflections should be attenuated according to the distance of the intersection (default: true).
|
|
235
|
-
*/
|
|
236
|
-
get attenuateIntersectionDistance() {
|
|
237
|
-
return this._thinSSRRenderingPipeline.attenuateIntersectionDistance;
|
|
238
|
-
}
|
|
239
|
-
set attenuateIntersectionDistance(attenuate) {
|
|
240
|
-
this._thinSSRRenderingPipeline.attenuateIntersectionDistance = attenuate;
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Gets or sets a boolean indicating if the reflections should be attenuated according to the number of iterations performed to find the intersection (default: true).
|
|
244
|
-
*/
|
|
245
|
-
get attenuateIntersectionIterations() {
|
|
246
|
-
return this._thinSSRRenderingPipeline.attenuateIntersectionIterations;
|
|
247
|
-
}
|
|
248
|
-
set attenuateIntersectionIterations(attenuate) {
|
|
249
|
-
this._thinSSRRenderingPipeline.attenuateIntersectionIterations = attenuate;
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Gets or sets a boolean indicating if the reflections should be attenuated when the reflection ray is facing the camera (the view direction) (default: false).
|
|
253
|
-
*/
|
|
254
|
-
get attenuateFacingCamera() {
|
|
255
|
-
return this._thinSSRRenderingPipeline.attenuateFacingCamera;
|
|
256
|
-
}
|
|
257
|
-
set attenuateFacingCamera(attenuate) {
|
|
258
|
-
this._thinSSRRenderingPipeline.attenuateFacingCamera = attenuate;
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Gets or sets a boolean indicating if the backface reflections should be attenuated (default: false).
|
|
262
|
-
*/
|
|
263
|
-
get attenuateBackfaceReflection() {
|
|
264
|
-
return this._thinSSRRenderingPipeline.attenuateBackfaceReflection;
|
|
265
|
-
}
|
|
266
|
-
set attenuateBackfaceReflection(attenuate) {
|
|
267
|
-
this._thinSSRRenderingPipeline.attenuateBackfaceReflection = attenuate;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Gets or sets a boolean indicating if the ray should be clipped to the frustum (default: true).
|
|
271
|
-
* You can try to set this parameter to false to save some performances: it may produce some artefacts in some cases, but generally they won't really be visible
|
|
272
|
-
*/
|
|
273
|
-
get clipToFrustum() {
|
|
274
|
-
return this._thinSSRRenderingPipeline.clipToFrustum;
|
|
275
|
-
}
|
|
276
|
-
set clipToFrustum(clip) {
|
|
277
|
-
this._thinSSRRenderingPipeline.clipToFrustum = clip;
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Gets or sets a boolean indicating whether the blending between the current color pixel and the reflection color should be done with a Fresnel coefficient (default: false).
|
|
281
|
-
* It is more physically accurate to use the Fresnel coefficient (otherwise it uses the reflectivity of the material for blending), but it is also more expensive when you use blur (when blurDispersionStrength \> 0).
|
|
282
|
-
*/
|
|
283
|
-
get useFresnel() {
|
|
284
|
-
return this._thinSSRRenderingPipeline.useFresnel;
|
|
285
|
-
}
|
|
286
|
-
set useFresnel(fresnel) {
|
|
287
|
-
this._thinSSRRenderingPipeline.useFresnel = fresnel;
|
|
288
|
-
this._buildPipeline();
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* Gets or sets a boolean defining if geometry thickness should be computed automatically (default: false).
|
|
292
|
-
* When enabled, a depth renderer is created which will render the back faces of the scene to a depth texture (meaning additional work for the GPU).
|
|
293
|
-
* In that mode, the "thickness" property is still used as an offset to compute the ray intersection, but you can typically use a much lower
|
|
294
|
-
* value than when enableAutomaticThicknessComputation is false (it's even possible to use a value of 0 when using low values for "step")
|
|
295
|
-
* Note that for performance reasons, this option will only apply to the first camera to which the rendering pipeline is attached!
|
|
296
|
-
*/
|
|
297
|
-
get enableAutomaticThicknessComputation() {
|
|
298
|
-
return this._thinSSRRenderingPipeline.enableAutomaticThicknessComputation;
|
|
299
|
-
}
|
|
300
|
-
set enableAutomaticThicknessComputation(automatic) {
|
|
301
|
-
this._thinSSRRenderingPipeline.enableAutomaticThicknessComputation = automatic;
|
|
302
|
-
this._buildPipeline();
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Gets the depth renderer used to render the back faces of the scene to a depth texture.
|
|
306
|
-
*/
|
|
307
|
-
get backfaceDepthRenderer() {
|
|
308
|
-
return this._depthRenderer;
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* Gets or sets the downsample factor (default: 0) used to create the backface depth texture - used only if enableAutomaticThicknessComputation = true.
|
|
312
|
-
* Use 0 to render the depth at full resolution, 1 to render at half resolution, 2 to render at 1/4 resolution, etc.
|
|
313
|
-
* Note that you will get rendering artefacts when using a value different from 0: it's a tradeoff between image quality and performances.
|
|
314
|
-
*/
|
|
315
|
-
get backfaceDepthTextureDownsample() {
|
|
316
|
-
return this._backfaceDepthTextureDownsample;
|
|
317
|
-
}
|
|
318
|
-
set backfaceDepthTextureDownsample(factor) {
|
|
319
|
-
if (this._backfaceDepthTextureDownsample === factor) {
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
this._backfaceDepthTextureDownsample = factor;
|
|
323
|
-
this._resizeDepthRenderer();
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Gets or sets a boolean (default: true) indicating if the depth of transparent meshes should be written to the backface depth texture (when automatic thickness computation is enabled).
|
|
327
|
-
*/
|
|
328
|
-
get backfaceForceDepthWriteTransparentMeshes() {
|
|
329
|
-
return this._backfaceForceDepthWriteTransparentMeshes;
|
|
330
|
-
}
|
|
331
|
-
set backfaceForceDepthWriteTransparentMeshes(force) {
|
|
332
|
-
if (this._backfaceForceDepthWriteTransparentMeshes === force) {
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
this._backfaceForceDepthWriteTransparentMeshes = force;
|
|
336
|
-
if (this._depthRenderer) {
|
|
337
|
-
this._depthRenderer.forceDepthWriteTransparentMeshes = force;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* Gets or sets a boolean indicating if the effect is enabled (default: true).
|
|
342
|
-
*/
|
|
343
|
-
get isEnabled() {
|
|
344
|
-
return this._isEnabled;
|
|
345
|
-
}
|
|
346
|
-
set isEnabled(value) {
|
|
347
|
-
if (this._isEnabled === value) {
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
this._isEnabled = value;
|
|
351
|
-
if (!value) {
|
|
352
|
-
if (this._cameras !== null) {
|
|
353
|
-
this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
|
|
354
|
-
this._cameras = this._camerasToBeAttached.slice();
|
|
34
|
+
let SSRRenderingPipeline = (() => {
|
|
35
|
+
var _a;
|
|
36
|
+
let _classSuper = PostProcessRenderPipeline;
|
|
37
|
+
let _instanceExtraInitializers = [];
|
|
38
|
+
let _get_samples_decorators;
|
|
39
|
+
let _get_maxDistance_decorators;
|
|
40
|
+
let _get_step_decorators;
|
|
41
|
+
let _get_thickness_decorators;
|
|
42
|
+
let _get_strength_decorators;
|
|
43
|
+
let _get_reflectionSpecularFalloffExponent_decorators;
|
|
44
|
+
let _get_maxSteps_decorators;
|
|
45
|
+
let _get_roughnessFactor_decorators;
|
|
46
|
+
let _get_selfCollisionNumSkip_decorators;
|
|
47
|
+
let _get_reflectivityThreshold_decorators;
|
|
48
|
+
let _get_ssrDownsample_decorators;
|
|
49
|
+
let _get_blurDispersionStrength_decorators;
|
|
50
|
+
let _get_blurDownsample_decorators;
|
|
51
|
+
let _get_enableSmoothReflections_decorators;
|
|
52
|
+
let _get_environmentTexture_decorators;
|
|
53
|
+
let _get_environmentTextureIsProbe_decorators;
|
|
54
|
+
let _get_attenuateScreenBorders_decorators;
|
|
55
|
+
let _get_attenuateIntersectionDistance_decorators;
|
|
56
|
+
let _get_attenuateIntersectionIterations_decorators;
|
|
57
|
+
let _get_attenuateFacingCamera_decorators;
|
|
58
|
+
let _get_attenuateBackfaceReflection_decorators;
|
|
59
|
+
let _get_clipToFrustum_decorators;
|
|
60
|
+
let _get_useFresnel_decorators;
|
|
61
|
+
let _get_enableAutomaticThicknessComputation_decorators;
|
|
62
|
+
let __backfaceDepthTextureDownsample_decorators;
|
|
63
|
+
let __backfaceDepthTextureDownsample_initializers = [];
|
|
64
|
+
let __backfaceDepthTextureDownsample_extraInitializers = [];
|
|
65
|
+
let __backfaceForceDepthWriteTransparentMeshes_decorators;
|
|
66
|
+
let __backfaceForceDepthWriteTransparentMeshes_initializers = [];
|
|
67
|
+
let __backfaceForceDepthWriteTransparentMeshes_extraInitializers = [];
|
|
68
|
+
let __isEnabled_decorators;
|
|
69
|
+
let __isEnabled_initializers = [];
|
|
70
|
+
let __isEnabled_extraInitializers = [];
|
|
71
|
+
let _get_inputTextureColorIsInGammaSpace_decorators;
|
|
72
|
+
let _get_generateOutputInGammaSpace_decorators;
|
|
73
|
+
let _get_debug_decorators;
|
|
74
|
+
return _a = class SSRRenderingPipeline extends _classSuper {
|
|
75
|
+
/**
|
|
76
|
+
* MSAA sample count, setting this to 4 will provide 4x anti aliasing. (default: 1)
|
|
77
|
+
*/
|
|
78
|
+
set samples(sampleCount) {
|
|
79
|
+
if (this._samples === sampleCount) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
this._samples = sampleCount;
|
|
83
|
+
if (this._ssrPostProcess) {
|
|
84
|
+
this._ssrPostProcess.samples = this.samples;
|
|
85
|
+
}
|
|
355
86
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
87
|
+
get samples() {
|
|
88
|
+
return this._samples;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Gets or sets the maxDistance used to define how far we look for reflection during the ray-marching on the reflected ray (default: 1000).
|
|
92
|
+
* Note that this value is a view (camera) space distance (not pixels!).
|
|
93
|
+
*/
|
|
94
|
+
get maxDistance() {
|
|
95
|
+
return this._thinSSRRenderingPipeline.maxDistance;
|
|
96
|
+
}
|
|
97
|
+
set maxDistance(distance) {
|
|
98
|
+
this._thinSSRRenderingPipeline.maxDistance = distance;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Gets or sets the step size used to iterate until the effect finds the color of the reflection's pixel. Should be an integer \>= 1 as it is the number of pixels we advance at each step (default: 1).
|
|
102
|
+
* Use higher values to improve performances (but at the expense of quality).
|
|
103
|
+
*/
|
|
104
|
+
get step() {
|
|
105
|
+
return this._thinSSRRenderingPipeline.step;
|
|
106
|
+
}
|
|
107
|
+
set step(step) {
|
|
108
|
+
this._thinSSRRenderingPipeline.step = step;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Gets or sets the thickness value used as tolerance when computing the intersection between the reflected ray and the scene (default: 0.5).
|
|
112
|
+
* If setting "enableAutomaticThicknessComputation" to true, you can use lower values for "thickness" (even 0), as the geometry thickness
|
|
113
|
+
* is automatically computed thank to the regular depth buffer + the backface depth buffer
|
|
114
|
+
*/
|
|
115
|
+
get thickness() {
|
|
116
|
+
return this._thinSSRRenderingPipeline.thickness;
|
|
117
|
+
}
|
|
118
|
+
set thickness(thickness) {
|
|
119
|
+
this._thinSSRRenderingPipeline.thickness = thickness;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Gets or sets the current reflection strength. 1.0 is an ideal value but can be increased/decreased for particular results (default: 1).
|
|
123
|
+
*/
|
|
124
|
+
get strength() {
|
|
125
|
+
return this._thinSSRRenderingPipeline.strength;
|
|
126
|
+
}
|
|
127
|
+
set strength(strength) {
|
|
128
|
+
this._thinSSRRenderingPipeline.strength = strength;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Gets or sets the falloff exponent used to compute the reflection strength. Higher values lead to fainter reflections (default: 1).
|
|
132
|
+
*/
|
|
133
|
+
get reflectionSpecularFalloffExponent() {
|
|
134
|
+
return this._thinSSRRenderingPipeline.reflectionSpecularFalloffExponent;
|
|
135
|
+
}
|
|
136
|
+
set reflectionSpecularFalloffExponent(exponent) {
|
|
137
|
+
this._thinSSRRenderingPipeline.reflectionSpecularFalloffExponent = exponent;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Maximum number of steps during the ray marching process after which we consider an intersection could not be found (default: 1000).
|
|
141
|
+
* Should be an integer value.
|
|
142
|
+
*/
|
|
143
|
+
get maxSteps() {
|
|
144
|
+
return this._thinSSRRenderingPipeline.maxSteps;
|
|
145
|
+
}
|
|
146
|
+
set maxSteps(steps) {
|
|
147
|
+
this._thinSSRRenderingPipeline.maxSteps = steps;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Gets or sets the factor applied when computing roughness. Default value is 0.2.
|
|
151
|
+
* When blurring based on roughness is enabled (meaning blurDispersionStrength \> 0), roughnessFactor is used as a global roughness factor applied on all objects.
|
|
152
|
+
* If you want to disable this global roughness set it to 0.
|
|
153
|
+
*/
|
|
154
|
+
get roughnessFactor() {
|
|
155
|
+
return this._thinSSRRenderingPipeline.roughnessFactor;
|
|
156
|
+
}
|
|
157
|
+
set roughnessFactor(factor) {
|
|
158
|
+
this._thinSSRRenderingPipeline.roughnessFactor = factor;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Number of steps to skip at start when marching the ray to avoid self collisions (default: 1)
|
|
162
|
+
* 1 should normally be a good value, depending on the scene you may need to use a higher value (2 or 3)
|
|
163
|
+
*/
|
|
164
|
+
get selfCollisionNumSkip() {
|
|
165
|
+
return this._thinSSRRenderingPipeline.selfCollisionNumSkip;
|
|
166
|
+
}
|
|
167
|
+
set selfCollisionNumSkip(skip) {
|
|
168
|
+
this._thinSSRRenderingPipeline.selfCollisionNumSkip = skip;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Gets or sets the minimum value for one of the reflectivity component of the material to consider it for SSR (default: 0.04).
|
|
172
|
+
* If all r/g/b components of the reflectivity is below or equal this value, the pixel will not be considered reflective and SSR won't be applied.
|
|
173
|
+
*/
|
|
174
|
+
get reflectivityThreshold() {
|
|
175
|
+
return this._thinSSRRenderingPipeline.reflectivityThreshold;
|
|
176
|
+
}
|
|
177
|
+
set reflectivityThreshold(threshold) {
|
|
178
|
+
const currentThreshold = this.reflectivityThreshold;
|
|
179
|
+
if (threshold === currentThreshold) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
this._thinSSRRenderingPipeline.reflectivityThreshold = threshold;
|
|
183
|
+
if ((threshold === 0 && currentThreshold !== 0) || (threshold !== 0 && currentThreshold === 0)) {
|
|
184
|
+
this._buildPipeline();
|
|
361
185
|
}
|
|
362
186
|
}
|
|
363
|
-
|
|
187
|
+
/**
|
|
188
|
+
* Gets or sets the downsample factor used to reduce the size of the texture used to compute the SSR contribution (default: 0).
|
|
189
|
+
* Use 0 to render the SSR contribution at full resolution, 1 to render at half resolution, 2 to render at 1/3 resolution, etc.
|
|
190
|
+
* Note that it is used only when blurring is enabled (blurDispersionStrength \> 0), because in that mode the SSR contribution is generated in a separate texture.
|
|
191
|
+
*/
|
|
192
|
+
get ssrDownsample() {
|
|
193
|
+
return this._thinSSRRenderingPipeline.ssrDownsample;
|
|
194
|
+
}
|
|
195
|
+
set ssrDownsample(downsample) {
|
|
196
|
+
this._thinSSRRenderingPipeline.ssrDownsample = downsample;
|
|
364
197
|
this._buildPipeline();
|
|
365
198
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
return this._thinSSRRenderingPipeline.inputTextureColorIsInGammaSpace;
|
|
374
|
-
}
|
|
375
|
-
set inputTextureColorIsInGammaSpace(gammaSpace) {
|
|
376
|
-
this._thinSSRRenderingPipeline.inputTextureColorIsInGammaSpace = gammaSpace;
|
|
377
|
-
this._buildPipeline();
|
|
378
|
-
}
|
|
379
|
-
/**
|
|
380
|
-
* Gets or sets a boolean defining if the output color texture generated by the SSR pipeline should be in gamma space (default: true)
|
|
381
|
-
* If you have a post-process that comes after the SSR and that post-process needs the input to be in a linear space, you must disable generateOutputInGammaSpace
|
|
382
|
-
*/
|
|
383
|
-
get generateOutputInGammaSpace() {
|
|
384
|
-
return this._thinSSRRenderingPipeline.generateOutputInGammaSpace;
|
|
385
|
-
}
|
|
386
|
-
set generateOutputInGammaSpace(gammaSpace) {
|
|
387
|
-
this._thinSSRRenderingPipeline.generateOutputInGammaSpace = gammaSpace;
|
|
388
|
-
this._buildPipeline();
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* Gets or sets a boolean indicating if the effect should be rendered in debug mode (default: false).
|
|
392
|
-
* In this mode, colors have this meaning:
|
|
393
|
-
* - blue: the ray hit the max distance (we reached maxDistance)
|
|
394
|
-
* - red: the ray ran out of steps (we reached maxSteps)
|
|
395
|
-
* - yellow: the ray went off screen
|
|
396
|
-
* - green: the ray hit a surface. The brightness of the green color is proportional to the distance between the ray origin and the intersection point: A brighter green means more computation than a darker green.
|
|
397
|
-
* In the first 3 cases, the final color is calculated by mixing the skybox color with the pixel color (if environmentTexture is defined), otherwise the pixel color is not modified
|
|
398
|
-
* You should try to get as few blue/red/yellow pixels as possible, as this means that the ray has gone further than if it had hit a surface.
|
|
399
|
-
*/
|
|
400
|
-
get debug() {
|
|
401
|
-
return this._thinSSRRenderingPipeline.debug;
|
|
402
|
-
}
|
|
403
|
-
set debug(value) {
|
|
404
|
-
this._thinSSRRenderingPipeline.debug = value;
|
|
405
|
-
this._buildPipeline();
|
|
406
|
-
}
|
|
407
|
-
/**
|
|
408
|
-
* Checks if all the post processes in the pipeline are ready.
|
|
409
|
-
* @returns True if all the post processes in the pipeline are ready
|
|
410
|
-
*/
|
|
411
|
-
isReady() {
|
|
412
|
-
return this._thinSSRRenderingPipeline.isReady();
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* Gets the scene the effect belongs to.
|
|
416
|
-
* @returns the scene the effect belongs to.
|
|
417
|
-
*/
|
|
418
|
-
getScene() {
|
|
419
|
-
return this._scene;
|
|
420
|
-
}
|
|
421
|
-
get _geometryBufferRenderer() {
|
|
422
|
-
if (!this._forceGeometryBuffer) {
|
|
423
|
-
return null;
|
|
424
|
-
}
|
|
425
|
-
return this._scene.geometryBufferRenderer;
|
|
426
|
-
}
|
|
427
|
-
get _prePassRenderer() {
|
|
428
|
-
if (this._forceGeometryBuffer) {
|
|
429
|
-
return null;
|
|
430
|
-
}
|
|
431
|
-
return this._scene.prePassRenderer;
|
|
432
|
-
}
|
|
433
|
-
/**
|
|
434
|
-
* Gets active scene
|
|
435
|
-
*/
|
|
436
|
-
get scene() {
|
|
437
|
-
return this._scene;
|
|
438
|
-
}
|
|
439
|
-
/**
|
|
440
|
-
* Returns true if SSR is supported by the running hardware
|
|
441
|
-
*/
|
|
442
|
-
get isSupported() {
|
|
443
|
-
const caps = this._scene.getEngine().getCaps();
|
|
444
|
-
return caps.drawBuffersExtension && caps.texelFetch;
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* Constructor of the SSR rendering pipeline
|
|
448
|
-
* @param name The rendering pipeline name
|
|
449
|
-
* @param scene The scene linked to this pipeline
|
|
450
|
-
* @param cameras The array of cameras that the rendering pipeline will be attached to (default: scene.cameras)
|
|
451
|
-
* @param forceGeometryBuffer Set to true if you want to use the legacy geometry buffer renderer (default: false)
|
|
452
|
-
* @param textureType The texture type used by the different post processes created by SSR (default: 0)
|
|
453
|
-
* @param useScreenspaceDepth Indicates if the depth buffer should be linear or screenspace (default: false). This allows sharing the buffer with other effect pipelines that may require the depth to be in screenspace.
|
|
454
|
-
*/
|
|
455
|
-
constructor(name, scene, cameras, forceGeometryBuffer = false, textureType = 0, useScreenspaceDepth = false) {
|
|
456
|
-
RegisterPrePassRendererSceneComponent(PrePassRenderer);
|
|
457
|
-
RegisterGeometryBufferRendererSceneComponent(GeometryBufferRenderer);
|
|
458
|
-
super(scene.getEngine(), name);
|
|
459
|
-
/**
|
|
460
|
-
* The SSR PostProcess effect id in the pipeline
|
|
461
|
-
*/
|
|
462
|
-
this.SSRRenderEffect = "SSRRenderEffect";
|
|
463
|
-
/**
|
|
464
|
-
* The blur PostProcess effect id in the pipeline
|
|
465
|
-
*/
|
|
466
|
-
this.SSRBlurRenderEffect = "SSRBlurRenderEffect";
|
|
467
|
-
/**
|
|
468
|
-
* The PostProcess effect id in the pipeline that combines the SSR-Blur output with the original scene color
|
|
469
|
-
*/
|
|
470
|
-
this.SSRCombineRenderEffect = "SSRCombineRenderEffect";
|
|
471
|
-
this._samples = 1;
|
|
472
|
-
this._backfaceDepthTextureDownsample = 0;
|
|
473
|
-
this._backfaceForceDepthWriteTransparentMeshes = true;
|
|
474
|
-
this._isEnabled = true;
|
|
475
|
-
this._forceGeometryBuffer = false;
|
|
476
|
-
this._isDirty = false;
|
|
477
|
-
this._camerasToBeAttached = [];
|
|
478
|
-
this._thinSSRRenderingPipeline = new ThinSSRRenderingPipeline(name, scene);
|
|
479
|
-
this._thinSSRRenderingPipeline.isSSRSupported = false;
|
|
480
|
-
this._thinSSRRenderingPipeline.useScreenspaceDepth = useScreenspaceDepth;
|
|
481
|
-
this._cameras = cameras || scene.cameras;
|
|
482
|
-
this._cameras = this._cameras.slice();
|
|
483
|
-
this._camerasToBeAttached = this._cameras.slice();
|
|
484
|
-
this._scene = scene;
|
|
485
|
-
this._textureType = textureType;
|
|
486
|
-
this._forceGeometryBuffer = forceGeometryBuffer;
|
|
487
|
-
if (this.isSupported) {
|
|
488
|
-
this._createSSRPostProcess();
|
|
489
|
-
scene.postProcessRenderPipelineManager.addPipeline(this);
|
|
490
|
-
if (this._forceGeometryBuffer) {
|
|
491
|
-
const geometryBufferRenderer = scene.enableGeometryBufferRenderer();
|
|
492
|
-
if (geometryBufferRenderer) {
|
|
493
|
-
geometryBufferRenderer.enableReflectivity = true;
|
|
494
|
-
geometryBufferRenderer.useSpecificClearForDepthTexture = true;
|
|
495
|
-
geometryBufferRenderer.enableScreenspaceDepth = this._useScreenspaceDepth;
|
|
496
|
-
geometryBufferRenderer.enableDepth = !this._useScreenspaceDepth;
|
|
497
|
-
}
|
|
199
|
+
/**
|
|
200
|
+
* Gets or sets the blur dispersion strength. Set this value to 0 to disable blurring (default: 0.03)
|
|
201
|
+
* The reflections are blurred based on the roughness of the surface and the distance between the pixel shaded and the reflected pixel: the higher the distance the more blurry the reflection is.
|
|
202
|
+
* blurDispersionStrength allows to increase or decrease this effect.
|
|
203
|
+
*/
|
|
204
|
+
get blurDispersionStrength() {
|
|
205
|
+
return this._thinSSRRenderingPipeline.blurDispersionStrength;
|
|
498
206
|
}
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
if (
|
|
502
|
-
|
|
503
|
-
|
|
207
|
+
set blurDispersionStrength(strength) {
|
|
208
|
+
const currentStrength = this.blurDispersionStrength;
|
|
209
|
+
if (strength === currentStrength) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
this._thinSSRRenderingPipeline.blurDispersionStrength = strength;
|
|
213
|
+
if ((strength === 0 && currentStrength !== 0) || (strength !== 0 && currentStrength === 0)) {
|
|
214
|
+
this._buildPipeline();
|
|
504
215
|
}
|
|
505
216
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
this.
|
|
217
|
+
_useBlur() {
|
|
218
|
+
return this.blurDispersionStrength > 0;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Gets or sets the downsample factor used to reduce the size of the textures used to blur the reflection effect (default: 0).
|
|
222
|
+
* Use 0 to blur at full resolution, 1 to render at half resolution, 2 to render at 1/3 resolution, etc.
|
|
223
|
+
*/
|
|
224
|
+
get blurDownsample() {
|
|
225
|
+
return this._thinSSRRenderingPipeline.blurDownsample;
|
|
226
|
+
}
|
|
227
|
+
set blurDownsample(downsample) {
|
|
228
|
+
this._thinSSRRenderingPipeline.blurDownsample = downsample;
|
|
229
|
+
this._buildPipeline();
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Gets or sets whether or not smoothing reflections is enabled (default: false)
|
|
233
|
+
* Enabling smoothing will require more GPU power.
|
|
234
|
+
* Note that this setting has no effect if step = 1: it's only used if step \> 1.
|
|
235
|
+
*/
|
|
236
|
+
get enableSmoothReflections() {
|
|
237
|
+
return this._thinSSRRenderingPipeline.enableSmoothReflections;
|
|
238
|
+
}
|
|
239
|
+
set enableSmoothReflections(enabled) {
|
|
240
|
+
this._thinSSRRenderingPipeline.enableSmoothReflections = enabled;
|
|
241
|
+
}
|
|
242
|
+
get _useScreenspaceDepth() {
|
|
243
|
+
return this._thinSSRRenderingPipeline.useScreenspaceDepth;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Gets or sets the environment cube texture used to define the reflection when the reflected rays of SSR leave the view space or when the maxDistance/maxSteps is reached.
|
|
247
|
+
*/
|
|
248
|
+
get environmentTexture() {
|
|
249
|
+
return this._thinSSRRenderingPipeline.environmentTexture;
|
|
250
|
+
}
|
|
251
|
+
set environmentTexture(texture) {
|
|
252
|
+
this._thinSSRRenderingPipeline.environmentTexture = texture;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Gets or sets the boolean defining if the environment texture is a standard cubemap (false) or a probe (true). Default value is false.
|
|
256
|
+
* Note: a probe cube texture is treated differently than an ordinary cube texture because the Y axis is reversed.
|
|
257
|
+
*/
|
|
258
|
+
get environmentTextureIsProbe() {
|
|
259
|
+
return this._thinSSRRenderingPipeline.environmentTextureIsProbe;
|
|
260
|
+
}
|
|
261
|
+
set environmentTextureIsProbe(isProbe) {
|
|
262
|
+
this._thinSSRRenderingPipeline.environmentTextureIsProbe = isProbe;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Gets or sets a boolean indicating if the reflections should be attenuated at the screen borders (default: true).
|
|
266
|
+
*/
|
|
267
|
+
get attenuateScreenBorders() {
|
|
268
|
+
return this._thinSSRRenderingPipeline.attenuateScreenBorders;
|
|
269
|
+
}
|
|
270
|
+
set attenuateScreenBorders(attenuate) {
|
|
271
|
+
this._thinSSRRenderingPipeline.attenuateScreenBorders = attenuate;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Gets or sets a boolean indicating if the reflections should be attenuated according to the distance of the intersection (default: true).
|
|
275
|
+
*/
|
|
276
|
+
get attenuateIntersectionDistance() {
|
|
277
|
+
return this._thinSSRRenderingPipeline.attenuateIntersectionDistance;
|
|
278
|
+
}
|
|
279
|
+
set attenuateIntersectionDistance(attenuate) {
|
|
280
|
+
this._thinSSRRenderingPipeline.attenuateIntersectionDistance = attenuate;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Gets or sets a boolean indicating if the reflections should be attenuated according to the number of iterations performed to find the intersection (default: true).
|
|
284
|
+
*/
|
|
285
|
+
get attenuateIntersectionIterations() {
|
|
286
|
+
return this._thinSSRRenderingPipeline.attenuateIntersectionIterations;
|
|
287
|
+
}
|
|
288
|
+
set attenuateIntersectionIterations(attenuate) {
|
|
289
|
+
this._thinSSRRenderingPipeline.attenuateIntersectionIterations = attenuate;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Gets or sets a boolean indicating if the reflections should be attenuated when the reflection ray is facing the camera (the view direction) (default: false).
|
|
293
|
+
*/
|
|
294
|
+
get attenuateFacingCamera() {
|
|
295
|
+
return this._thinSSRRenderingPipeline.attenuateFacingCamera;
|
|
296
|
+
}
|
|
297
|
+
set attenuateFacingCamera(attenuate) {
|
|
298
|
+
this._thinSSRRenderingPipeline.attenuateFacingCamera = attenuate;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Gets or sets a boolean indicating if the backface reflections should be attenuated (default: false).
|
|
302
|
+
*/
|
|
303
|
+
get attenuateBackfaceReflection() {
|
|
304
|
+
return this._thinSSRRenderingPipeline.attenuateBackfaceReflection;
|
|
305
|
+
}
|
|
306
|
+
set attenuateBackfaceReflection(attenuate) {
|
|
307
|
+
this._thinSSRRenderingPipeline.attenuateBackfaceReflection = attenuate;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Gets or sets a boolean indicating if the ray should be clipped to the frustum (default: true).
|
|
311
|
+
* You can try to set this parameter to false to save some performances: it may produce some artefacts in some cases, but generally they won't really be visible
|
|
312
|
+
*/
|
|
313
|
+
get clipToFrustum() {
|
|
314
|
+
return this._thinSSRRenderingPipeline.clipToFrustum;
|
|
315
|
+
}
|
|
316
|
+
set clipToFrustum(clip) {
|
|
317
|
+
this._thinSSRRenderingPipeline.clipToFrustum = clip;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Gets or sets a boolean indicating whether the blending between the current color pixel and the reflection color should be done with a Fresnel coefficient (default: false).
|
|
321
|
+
* It is more physically accurate to use the Fresnel coefficient (otherwise it uses the reflectivity of the material for blending), but it is also more expensive when you use blur (when blurDispersionStrength \> 0).
|
|
322
|
+
*/
|
|
323
|
+
get useFresnel() {
|
|
324
|
+
return this._thinSSRRenderingPipeline.useFresnel;
|
|
325
|
+
}
|
|
326
|
+
set useFresnel(fresnel) {
|
|
327
|
+
this._thinSSRRenderingPipeline.useFresnel = fresnel;
|
|
328
|
+
this._buildPipeline();
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Gets or sets a boolean defining if geometry thickness should be computed automatically (default: false).
|
|
332
|
+
* When enabled, a depth renderer is created which will render the back faces of the scene to a depth texture (meaning additional work for the GPU).
|
|
333
|
+
* In that mode, the "thickness" property is still used as an offset to compute the ray intersection, but you can typically use a much lower
|
|
334
|
+
* value than when enableAutomaticThicknessComputation is false (it's even possible to use a value of 0 when using low values for "step")
|
|
335
|
+
* Note that for performance reasons, this option will only apply to the first camera to which the rendering pipeline is attached!
|
|
336
|
+
*/
|
|
337
|
+
get enableAutomaticThicknessComputation() {
|
|
338
|
+
return this._thinSSRRenderingPipeline.enableAutomaticThicknessComputation;
|
|
339
|
+
}
|
|
340
|
+
set enableAutomaticThicknessComputation(automatic) {
|
|
341
|
+
this._thinSSRRenderingPipeline.enableAutomaticThicknessComputation = automatic;
|
|
342
|
+
this._buildPipeline();
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Gets the depth renderer used to render the back faces of the scene to a depth texture.
|
|
346
|
+
*/
|
|
347
|
+
get backfaceDepthRenderer() {
|
|
348
|
+
return this._depthRenderer;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Gets or sets the downsample factor (default: 0) used to create the backface depth texture - used only if enableAutomaticThicknessComputation = true.
|
|
352
|
+
* Use 0 to render the depth at full resolution, 1 to render at half resolution, 2 to render at 1/4 resolution, etc.
|
|
353
|
+
* Note that you will get rendering artefacts when using a value different from 0: it's a tradeoff between image quality and performances.
|
|
354
|
+
*/
|
|
355
|
+
get backfaceDepthTextureDownsample() {
|
|
356
|
+
return this._backfaceDepthTextureDownsample;
|
|
357
|
+
}
|
|
358
|
+
set backfaceDepthTextureDownsample(factor) {
|
|
359
|
+
if (this._backfaceDepthTextureDownsample === factor) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
this._backfaceDepthTextureDownsample = factor;
|
|
594
363
|
this._resizeDepthRenderer();
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
}, true));
|
|
610
|
-
}
|
|
611
|
-
if (this._cameras !== null) {
|
|
612
|
-
this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name, this._cameras);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
_resizeDepthRenderer() {
|
|
616
|
-
if (!this._depthRenderer) {
|
|
617
|
-
return;
|
|
618
|
-
}
|
|
619
|
-
const textureSize = this._getTextureSize();
|
|
620
|
-
const depthRendererSize = this._depthRenderer.getDepthMap().getSize();
|
|
621
|
-
const width = Math.floor(textureSize.width / (this.backfaceDepthTextureDownsample + 1));
|
|
622
|
-
const height = Math.floor(textureSize.height / (this.backfaceDepthTextureDownsample + 1));
|
|
623
|
-
if (depthRendererSize.width !== width || depthRendererSize.height !== height) {
|
|
624
|
-
this._depthRenderer.getDepthMap().resize({ width, height });
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
_disposeDepthRenderer() {
|
|
628
|
-
if (this._depthRenderer) {
|
|
629
|
-
if (this._depthRendererCamera) {
|
|
630
|
-
const idx = this._depthRendererCamera.customRenderTargets.indexOf(this._depthRenderer.getDepthMap()) ?? -1;
|
|
631
|
-
if (idx !== -1) {
|
|
632
|
-
this._depthRendererCamera.customRenderTargets.splice(idx, 1);
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Gets or sets a boolean (default: true) indicating if the depth of transparent meshes should be written to the backface depth texture (when automatic thickness computation is enabled).
|
|
367
|
+
*/
|
|
368
|
+
get backfaceForceDepthWriteTransparentMeshes() {
|
|
369
|
+
return this._backfaceForceDepthWriteTransparentMeshes;
|
|
370
|
+
}
|
|
371
|
+
set backfaceForceDepthWriteTransparentMeshes(force) {
|
|
372
|
+
if (this._backfaceForceDepthWriteTransparentMeshes === force) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
this._backfaceForceDepthWriteTransparentMeshes = force;
|
|
376
|
+
if (this._depthRenderer) {
|
|
377
|
+
this._depthRenderer.forceDepthWriteTransparentMeshes = force;
|
|
633
378
|
}
|
|
634
379
|
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
_disposeSSRPostProcess() {
|
|
652
|
-
for (let i = 0; i < this._cameras.length; i++) {
|
|
653
|
-
const camera = this._cameras[i];
|
|
654
|
-
this._ssrPostProcess?.dispose(camera);
|
|
655
|
-
}
|
|
656
|
-
this._ssrPostProcess = null;
|
|
657
|
-
}
|
|
658
|
-
_createSSRPostProcess() {
|
|
659
|
-
this._ssrPostProcess = new PostProcess("ssr", ThinSSRPostProcess.FragmentUrl, {
|
|
660
|
-
uniformNames: ThinSSRPostProcess.Uniforms,
|
|
661
|
-
samplerNames: ThinSSRPostProcess.Samplers,
|
|
662
|
-
size: 1.0,
|
|
663
|
-
samplingMode: 2,
|
|
664
|
-
engine: this._scene.getEngine(),
|
|
665
|
-
textureType: this._textureType,
|
|
666
|
-
effectWrapper: this._thinSSRRenderingPipeline._ssrPostProcess,
|
|
667
|
-
});
|
|
668
|
-
this._ssrPostProcess.onApply = (effect) => {
|
|
669
|
-
this._resizeDepthRenderer();
|
|
670
|
-
const geometryBufferRenderer = this._geometryBufferRenderer;
|
|
671
|
-
const prePassRenderer = this._prePassRenderer;
|
|
672
|
-
if (!prePassRenderer && !geometryBufferRenderer) {
|
|
673
|
-
return;
|
|
674
|
-
}
|
|
675
|
-
if (geometryBufferRenderer) {
|
|
676
|
-
const roughnessIndex = geometryBufferRenderer.getTextureIndex(GeometryBufferRenderer.REFLECTIVITY_TEXTURE_TYPE);
|
|
677
|
-
const normalIndex = geometryBufferRenderer.getTextureIndex(GeometryBufferRenderer.NORMAL_TEXTURE_TYPE);
|
|
678
|
-
effect.setTexture("normalSampler", geometryBufferRenderer.getGBuffer().textures[normalIndex]);
|
|
679
|
-
effect.setTexture("reflectivitySampler", geometryBufferRenderer.getGBuffer().textures[roughnessIndex]);
|
|
680
|
-
if (this._useScreenspaceDepth) {
|
|
681
|
-
const depthIndex = geometryBufferRenderer.getTextureIndex(GeometryBufferRenderer.SCREENSPACE_DEPTH_TEXTURE_TYPE);
|
|
682
|
-
effect.setTexture("depthSampler", geometryBufferRenderer.getGBuffer().textures[depthIndex]);
|
|
380
|
+
/**
|
|
381
|
+
* Gets or sets a boolean indicating if the effect is enabled (default: true).
|
|
382
|
+
*/
|
|
383
|
+
get isEnabled() {
|
|
384
|
+
return this._isEnabled;
|
|
385
|
+
}
|
|
386
|
+
set isEnabled(value) {
|
|
387
|
+
if (this._isEnabled === value) {
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
this._isEnabled = value;
|
|
391
|
+
if (!value) {
|
|
392
|
+
if (this._cameras !== null) {
|
|
393
|
+
this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
|
|
394
|
+
this._cameras = this._camerasToBeAttached.slice();
|
|
395
|
+
}
|
|
683
396
|
}
|
|
684
|
-
else {
|
|
685
|
-
|
|
686
|
-
|
|
397
|
+
else if (value) {
|
|
398
|
+
if (!this._isDirty) {
|
|
399
|
+
if (this._cameras !== null) {
|
|
400
|
+
this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name, this._cameras);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
this._buildPipeline();
|
|
405
|
+
}
|
|
687
406
|
}
|
|
688
407
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
engine,
|
|
746
|
-
textureType: this._textureType,
|
|
747
|
-
effectWrapper: this._thinSSRRenderingPipeline._ssrBlurCombinerPostProcess,
|
|
748
|
-
});
|
|
749
|
-
this._blurCombinerPostProcess.autoClear = false;
|
|
750
|
-
this._blurCombinerPostProcess.onApplyObservable.add((effect) => {
|
|
751
|
-
const geometryBufferRenderer = this._geometryBufferRenderer;
|
|
752
|
-
const prePassRenderer = this._prePassRenderer;
|
|
753
|
-
if (!prePassRenderer && !geometryBufferRenderer) {
|
|
754
|
-
return;
|
|
755
|
-
}
|
|
756
|
-
if (prePassRenderer && this._scene.activeCamera?._getFirstPostProcess() === this._ssrPostProcess) {
|
|
757
|
-
const renderTarget = prePassRenderer.getRenderTarget();
|
|
758
|
-
if (renderTarget && renderTarget.textures) {
|
|
759
|
-
effect.setTexture("mainSampler", renderTarget.textures[prePassRenderer.getIndex(4)]);
|
|
408
|
+
/**
|
|
409
|
+
* Gets or sets a boolean defining if the input color texture is in gamma space (default: true)
|
|
410
|
+
* The SSR effect works in linear space, so if the input texture is in gamma space, we must convert the texture to linear space before applying the effect
|
|
411
|
+
*/
|
|
412
|
+
get inputTextureColorIsInGammaSpace() {
|
|
413
|
+
return this._thinSSRRenderingPipeline.inputTextureColorIsInGammaSpace;
|
|
414
|
+
}
|
|
415
|
+
set inputTextureColorIsInGammaSpace(gammaSpace) {
|
|
416
|
+
this._thinSSRRenderingPipeline.inputTextureColorIsInGammaSpace = gammaSpace;
|
|
417
|
+
this._buildPipeline();
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Gets or sets a boolean defining if the output color texture generated by the SSR pipeline should be in gamma space (default: true)
|
|
421
|
+
* If you have a post-process that comes after the SSR and that post-process needs the input to be in a linear space, you must disable generateOutputInGammaSpace
|
|
422
|
+
*/
|
|
423
|
+
get generateOutputInGammaSpace() {
|
|
424
|
+
return this._thinSSRRenderingPipeline.generateOutputInGammaSpace;
|
|
425
|
+
}
|
|
426
|
+
set generateOutputInGammaSpace(gammaSpace) {
|
|
427
|
+
this._thinSSRRenderingPipeline.generateOutputInGammaSpace = gammaSpace;
|
|
428
|
+
this._buildPipeline();
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Gets or sets a boolean indicating if the effect should be rendered in debug mode (default: false).
|
|
432
|
+
* In this mode, colors have this meaning:
|
|
433
|
+
* - blue: the ray hit the max distance (we reached maxDistance)
|
|
434
|
+
* - red: the ray ran out of steps (we reached maxSteps)
|
|
435
|
+
* - yellow: the ray went off screen
|
|
436
|
+
* - green: the ray hit a surface. The brightness of the green color is proportional to the distance between the ray origin and the intersection point: A brighter green means more computation than a darker green.
|
|
437
|
+
* In the first 3 cases, the final color is calculated by mixing the skybox color with the pixel color (if environmentTexture is defined), otherwise the pixel color is not modified
|
|
438
|
+
* You should try to get as few blue/red/yellow pixels as possible, as this means that the ray has gone further than if it had hit a surface.
|
|
439
|
+
*/
|
|
440
|
+
get debug() {
|
|
441
|
+
return this._thinSSRRenderingPipeline.debug;
|
|
442
|
+
}
|
|
443
|
+
set debug(value) {
|
|
444
|
+
this._thinSSRRenderingPipeline.debug = value;
|
|
445
|
+
this._buildPipeline();
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Checks if all the post processes in the pipeline are ready.
|
|
449
|
+
* @returns True if all the post processes in the pipeline are ready
|
|
450
|
+
*/
|
|
451
|
+
isReady() {
|
|
452
|
+
return this._thinSSRRenderingPipeline.isReady();
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Gets the scene the effect belongs to.
|
|
456
|
+
* @returns the scene the effect belongs to.
|
|
457
|
+
*/
|
|
458
|
+
getScene() {
|
|
459
|
+
return this._scene;
|
|
460
|
+
}
|
|
461
|
+
get _geometryBufferRenderer() {
|
|
462
|
+
if (!this._forceGeometryBuffer) {
|
|
463
|
+
return null;
|
|
760
464
|
}
|
|
465
|
+
return this._scene.geometryBufferRenderer;
|
|
761
466
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
467
|
+
get _prePassRenderer() {
|
|
468
|
+
if (this._forceGeometryBuffer) {
|
|
469
|
+
return null;
|
|
470
|
+
}
|
|
471
|
+
return this._scene.prePassRenderer;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Gets active scene
|
|
475
|
+
*/
|
|
476
|
+
get scene() {
|
|
477
|
+
return this._scene;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Returns true if SSR is supported by the running hardware
|
|
481
|
+
*/
|
|
482
|
+
get isSupported() {
|
|
483
|
+
const caps = this._scene.getEngine().getCaps();
|
|
484
|
+
return caps.drawBuffersExtension && caps.texelFetch;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Constructor of the SSR rendering pipeline
|
|
488
|
+
* @param name The rendering pipeline name
|
|
489
|
+
* @param scene The scene linked to this pipeline
|
|
490
|
+
* @param cameras The array of cameras that the rendering pipeline will be attached to (default: scene.cameras)
|
|
491
|
+
* @param forceGeometryBuffer Set to true if you want to use the legacy geometry buffer renderer (default: false)
|
|
492
|
+
* @param textureType The texture type used by the different post processes created by SSR (default: 0)
|
|
493
|
+
* @param useScreenspaceDepth Indicates if the depth buffer should be linear or screenspace (default: false). This allows sharing the buffer with other effect pipelines that may require the depth to be in screenspace.
|
|
494
|
+
*/
|
|
495
|
+
constructor(name, scene, cameras, forceGeometryBuffer = false, textureType = 0, useScreenspaceDepth = false) {
|
|
496
|
+
RegisterPrePassRendererSceneComponent(PrePassRenderer);
|
|
497
|
+
RegisterGeometryBufferRendererSceneComponent(GeometryBufferRenderer);
|
|
498
|
+
super(scene.getEngine(), name);
|
|
499
|
+
/**
|
|
500
|
+
* The SSR PostProcess effect id in the pipeline
|
|
501
|
+
*/
|
|
502
|
+
this.SSRRenderEffect = (__runInitializers(this, _instanceExtraInitializers), "SSRRenderEffect");
|
|
503
|
+
/**
|
|
504
|
+
* The blur PostProcess effect id in the pipeline
|
|
505
|
+
*/
|
|
506
|
+
this.SSRBlurRenderEffect = "SSRBlurRenderEffect";
|
|
507
|
+
/**
|
|
508
|
+
* The PostProcess effect id in the pipeline that combines the SSR-Blur output with the original scene color
|
|
509
|
+
*/
|
|
510
|
+
this.SSRCombineRenderEffect = "SSRCombineRenderEffect";
|
|
511
|
+
this._samples = 1;
|
|
512
|
+
this._backfaceDepthTextureDownsample = __runInitializers(this, __backfaceDepthTextureDownsample_initializers, 0);
|
|
513
|
+
this._backfaceForceDepthWriteTransparentMeshes = (__runInitializers(this, __backfaceDepthTextureDownsample_extraInitializers), __runInitializers(this, __backfaceForceDepthWriteTransparentMeshes_initializers, true));
|
|
514
|
+
this._isEnabled = (__runInitializers(this, __backfaceForceDepthWriteTransparentMeshes_extraInitializers), __runInitializers(this, __isEnabled_initializers, true));
|
|
515
|
+
this._forceGeometryBuffer = (__runInitializers(this, __isEnabled_extraInitializers), false);
|
|
516
|
+
this._isDirty = false;
|
|
517
|
+
this._camerasToBeAttached = [];
|
|
518
|
+
this._thinSSRRenderingPipeline = new ThinSSRRenderingPipeline(name, scene);
|
|
519
|
+
this._thinSSRRenderingPipeline.isSSRSupported = false;
|
|
520
|
+
this._thinSSRRenderingPipeline.useScreenspaceDepth = useScreenspaceDepth;
|
|
521
|
+
this._cameras = cameras || scene.cameras;
|
|
522
|
+
this._cameras = this._cameras.slice();
|
|
523
|
+
this._camerasToBeAttached = this._cameras.slice();
|
|
524
|
+
this._scene = scene;
|
|
525
|
+
this._textureType = textureType;
|
|
526
|
+
this._forceGeometryBuffer = forceGeometryBuffer;
|
|
527
|
+
if (this.isSupported) {
|
|
528
|
+
this._createSSRPostProcess();
|
|
529
|
+
scene.postProcessRenderPipelineManager.addPipeline(this);
|
|
530
|
+
if (this._forceGeometryBuffer) {
|
|
531
|
+
const geometryBufferRenderer = scene.enableGeometryBufferRenderer();
|
|
532
|
+
if (geometryBufferRenderer) {
|
|
533
|
+
geometryBufferRenderer.enableReflectivity = true;
|
|
534
|
+
geometryBufferRenderer.useSpecificClearForDepthTexture = true;
|
|
535
|
+
geometryBufferRenderer.enableScreenspaceDepth = this._useScreenspaceDepth;
|
|
536
|
+
geometryBufferRenderer.enableDepth = !this._useScreenspaceDepth;
|
|
537
|
+
}
|
|
773
538
|
}
|
|
774
539
|
else {
|
|
775
|
-
|
|
540
|
+
const prePassRenderer = scene.enablePrePassRenderer();
|
|
541
|
+
if (prePassRenderer) {
|
|
542
|
+
prePassRenderer.useSpecificClearForDepthTexture = true;
|
|
543
|
+
prePassRenderer.markAsDirty();
|
|
544
|
+
}
|
|
776
545
|
}
|
|
546
|
+
this._thinSSRRenderingPipeline.isSSRSupported = !!this._geometryBufferRenderer || !!this._prePassRenderer;
|
|
547
|
+
this._buildPipeline();
|
|
777
548
|
}
|
|
778
549
|
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
550
|
+
/**
|
|
551
|
+
* Get the class name
|
|
552
|
+
* @returns "SSRRenderingPipeline"
|
|
553
|
+
*/
|
|
554
|
+
getClassName() {
|
|
555
|
+
return "SSRRenderingPipeline";
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Adds a camera to the pipeline
|
|
559
|
+
* @param camera the camera to be added
|
|
560
|
+
*/
|
|
561
|
+
addCamera(camera) {
|
|
562
|
+
this._camerasToBeAttached.push(camera);
|
|
563
|
+
this._buildPipeline();
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Removes a camera from the pipeline
|
|
567
|
+
* @param camera the camera to remove
|
|
568
|
+
*/
|
|
569
|
+
removeCamera(camera) {
|
|
570
|
+
const index = this._camerasToBeAttached.indexOf(camera);
|
|
571
|
+
this._camerasToBeAttached.splice(index, 1);
|
|
572
|
+
this._buildPipeline();
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Removes the internal pipeline assets and detaches the pipeline from the scene cameras
|
|
576
|
+
* @param disableGeometryBufferRenderer if the geometry buffer renderer should be disabled
|
|
577
|
+
*/
|
|
578
|
+
dispose(disableGeometryBufferRenderer = false) {
|
|
579
|
+
this._disposeDepthRenderer();
|
|
580
|
+
this._disposeSSRPostProcess();
|
|
581
|
+
this._disposeBlurPostProcesses();
|
|
582
|
+
if (disableGeometryBufferRenderer) {
|
|
583
|
+
this._scene.disableGeometryBufferRenderer();
|
|
787
584
|
}
|
|
585
|
+
this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
|
|
586
|
+
this._scene.postProcessRenderPipelineManager.removePipeline(this._name);
|
|
587
|
+
this._thinSSRRenderingPipeline.dispose();
|
|
588
|
+
super.dispose();
|
|
788
589
|
}
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
590
|
+
_getTextureSize() {
|
|
591
|
+
const engine = this._scene.getEngine();
|
|
592
|
+
const prePassRenderer = this._prePassRenderer;
|
|
593
|
+
let textureSize = { width: engine.getRenderWidth(), height: engine.getRenderHeight() };
|
|
594
|
+
if (prePassRenderer && this._scene.activeCamera?._getFirstPostProcess() === this._ssrPostProcess) {
|
|
595
|
+
const renderTarget = prePassRenderer.getRenderTarget();
|
|
596
|
+
if (renderTarget && renderTarget.textures) {
|
|
597
|
+
textureSize = renderTarget.textures[prePassRenderer.getIndex(4)].getSize();
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
else if (this._ssrPostProcess?.inputTexture) {
|
|
601
|
+
textureSize.width = this._ssrPostProcess.inputTexture.width;
|
|
602
|
+
textureSize.height = this._ssrPostProcess.inputTexture.height;
|
|
603
|
+
}
|
|
604
|
+
return textureSize;
|
|
605
|
+
}
|
|
606
|
+
_buildPipeline() {
|
|
607
|
+
if (!this.isSupported) {
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
610
|
+
if (!this._isEnabled) {
|
|
611
|
+
this._isDirty = true;
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
this._isDirty = false;
|
|
615
|
+
const engine = this._scene.getEngine();
|
|
616
|
+
this._disposeDepthRenderer();
|
|
617
|
+
if (this._cameras !== null) {
|
|
618
|
+
this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
|
|
619
|
+
// get back cameras to be used to reattach pipeline
|
|
620
|
+
this._cameras = this._camerasToBeAttached.slice();
|
|
621
|
+
if (this._cameras.length > 0) {
|
|
622
|
+
this._thinSSRRenderingPipeline.camera = this._cameras[0];
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
this._reset();
|
|
626
|
+
this._thinSSRRenderingPipeline.normalsAreInWorldSpace = !!(this._geometryBufferRenderer?.generateNormalsInWorldSpace ?? this._prePassRenderer?.generateNormalsInWorldSpace);
|
|
627
|
+
if (this.enableAutomaticThicknessComputation) {
|
|
628
|
+
const camera = this._cameras?.[0];
|
|
629
|
+
if (camera) {
|
|
630
|
+
this._depthRendererCamera = camera;
|
|
631
|
+
this._depthRenderer = new DepthRenderer(this._scene, undefined, undefined, this._useScreenspaceDepth, 1, !this._useScreenspaceDepth, "SSRBackDepth");
|
|
632
|
+
this._depthRenderer.reverseCulling = true; // we generate depth for the back faces
|
|
633
|
+
this._depthRenderer.forceDepthWriteTransparentMeshes = this.backfaceForceDepthWriteTransparentMeshes;
|
|
634
|
+
this._resizeDepthRenderer();
|
|
635
|
+
camera.customRenderTargets.push(this._depthRenderer.getDepthMap());
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
this.addEffect(new PostProcessRenderEffect(engine, this.SSRRenderEffect, () => {
|
|
639
|
+
return this._ssrPostProcess;
|
|
640
|
+
}, true));
|
|
641
|
+
this._disposeBlurPostProcesses();
|
|
642
|
+
if (this._useBlur()) {
|
|
643
|
+
this._createBlurAndCombinerPostProcesses();
|
|
644
|
+
this.addEffect(new PostProcessRenderEffect(engine, this.SSRBlurRenderEffect, () => {
|
|
645
|
+
return [this._blurPostProcessX, this._blurPostProcessY];
|
|
646
|
+
}, true));
|
|
647
|
+
this.addEffect(new PostProcessRenderEffect(engine, this.SSRCombineRenderEffect, () => {
|
|
648
|
+
return this._blurCombinerPostProcess;
|
|
649
|
+
}, true));
|
|
650
|
+
}
|
|
651
|
+
if (this._cameras !== null) {
|
|
652
|
+
this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name, this._cameras);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
_resizeDepthRenderer() {
|
|
656
|
+
if (!this._depthRenderer) {
|
|
657
|
+
return;
|
|
658
|
+
}
|
|
659
|
+
const textureSize = this._getTextureSize();
|
|
660
|
+
const depthRendererSize = this._depthRenderer.getDepthMap().getSize();
|
|
661
|
+
const width = Math.floor(textureSize.width / (this.backfaceDepthTextureDownsample + 1));
|
|
662
|
+
const height = Math.floor(textureSize.height / (this.backfaceDepthTextureDownsample + 1));
|
|
663
|
+
if (depthRendererSize.width !== width || depthRendererSize.height !== height) {
|
|
664
|
+
this._depthRenderer.getDepthMap().resize({ width, height });
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
_disposeDepthRenderer() {
|
|
668
|
+
if (this._depthRenderer) {
|
|
669
|
+
if (this._depthRendererCamera) {
|
|
670
|
+
const idx = this._depthRendererCamera.customRenderTargets.indexOf(this._depthRenderer.getDepthMap()) ?? -1;
|
|
671
|
+
if (idx !== -1) {
|
|
672
|
+
this._depthRendererCamera.customRenderTargets.splice(idx, 1);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
this._depthRendererCamera = null;
|
|
676
|
+
this._depthRenderer.getDepthMap().dispose();
|
|
677
|
+
}
|
|
678
|
+
this._depthRenderer = null;
|
|
679
|
+
}
|
|
680
|
+
_disposeBlurPostProcesses() {
|
|
681
|
+
for (let i = 0; i < this._cameras.length; i++) {
|
|
682
|
+
const camera = this._cameras[i];
|
|
683
|
+
this._blurPostProcessX?.dispose(camera);
|
|
684
|
+
this._blurPostProcessY?.dispose(camera);
|
|
685
|
+
this._blurCombinerPostProcess?.dispose(camera);
|
|
686
|
+
}
|
|
687
|
+
this._blurPostProcessX = null;
|
|
688
|
+
this._blurPostProcessY = null;
|
|
689
|
+
this._blurCombinerPostProcess = null;
|
|
690
|
+
}
|
|
691
|
+
_disposeSSRPostProcess() {
|
|
692
|
+
for (let i = 0; i < this._cameras.length; i++) {
|
|
693
|
+
const camera = this._cameras[i];
|
|
694
|
+
this._ssrPostProcess?.dispose(camera);
|
|
695
|
+
}
|
|
696
|
+
this._ssrPostProcess = null;
|
|
697
|
+
}
|
|
698
|
+
_createSSRPostProcess() {
|
|
699
|
+
this._ssrPostProcess = new PostProcess("ssr", ThinSSRPostProcess.FragmentUrl, {
|
|
700
|
+
uniformNames: ThinSSRPostProcess.Uniforms,
|
|
701
|
+
samplerNames: ThinSSRPostProcess.Samplers,
|
|
702
|
+
size: 1.0,
|
|
703
|
+
samplingMode: 2,
|
|
704
|
+
engine: this._scene.getEngine(),
|
|
705
|
+
textureType: this._textureType,
|
|
706
|
+
effectWrapper: this._thinSSRRenderingPipeline._ssrPostProcess,
|
|
707
|
+
});
|
|
708
|
+
this._ssrPostProcess.onApply = (effect) => {
|
|
709
|
+
this._resizeDepthRenderer();
|
|
710
|
+
const geometryBufferRenderer = this._geometryBufferRenderer;
|
|
711
|
+
const prePassRenderer = this._prePassRenderer;
|
|
712
|
+
if (!prePassRenderer && !geometryBufferRenderer) {
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
if (geometryBufferRenderer) {
|
|
716
|
+
const roughnessIndex = geometryBufferRenderer.getTextureIndex(GeometryBufferRenderer.REFLECTIVITY_TEXTURE_TYPE);
|
|
717
|
+
const normalIndex = geometryBufferRenderer.getTextureIndex(GeometryBufferRenderer.NORMAL_TEXTURE_TYPE);
|
|
718
|
+
effect.setTexture("normalSampler", geometryBufferRenderer.getGBuffer().textures[normalIndex]);
|
|
719
|
+
effect.setTexture("reflectivitySampler", geometryBufferRenderer.getGBuffer().textures[roughnessIndex]);
|
|
720
|
+
if (this._useScreenspaceDepth) {
|
|
721
|
+
const depthIndex = geometryBufferRenderer.getTextureIndex(GeometryBufferRenderer.SCREENSPACE_DEPTH_TEXTURE_TYPE);
|
|
722
|
+
effect.setTexture("depthSampler", geometryBufferRenderer.getGBuffer().textures[depthIndex]);
|
|
723
|
+
}
|
|
724
|
+
else {
|
|
725
|
+
const depthIndex = geometryBufferRenderer.getTextureIndex(GeometryBufferRenderer.DEPTH_TEXTURE_TYPE);
|
|
726
|
+
effect.setTexture("depthSampler", geometryBufferRenderer.getGBuffer().textures[depthIndex]);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
else if (prePassRenderer) {
|
|
730
|
+
const depthIndex = prePassRenderer.getIndex(this._useScreenspaceDepth ? 10 : 5);
|
|
731
|
+
const roughnessIndex = prePassRenderer.getIndex(3);
|
|
732
|
+
const normalIndex = prePassRenderer.getIndex(6);
|
|
733
|
+
effect.setTexture("normalSampler", prePassRenderer.getRenderTarget().textures[normalIndex]);
|
|
734
|
+
effect.setTexture("depthSampler", prePassRenderer.getRenderTarget().textures[depthIndex]);
|
|
735
|
+
effect.setTexture("reflectivitySampler", prePassRenderer.getRenderTarget().textures[roughnessIndex]);
|
|
736
|
+
}
|
|
737
|
+
if (this.enableAutomaticThicknessComputation && this._depthRenderer) {
|
|
738
|
+
effect.setTexture("backDepthSampler", this._depthRenderer.getDepthMap());
|
|
739
|
+
effect.setFloat("backSizeFactor", this.backfaceDepthTextureDownsample + 1);
|
|
740
|
+
}
|
|
741
|
+
const textureSize = this._getTextureSize();
|
|
742
|
+
this._thinSSRRenderingPipeline._ssrPostProcess.textureWidth = textureSize.width;
|
|
743
|
+
this._thinSSRRenderingPipeline._ssrPostProcess.textureHeight = textureSize.height;
|
|
744
|
+
};
|
|
745
|
+
this._ssrPostProcess.samples = this.samples;
|
|
746
|
+
if (!this._forceGeometryBuffer) {
|
|
747
|
+
this._ssrPostProcess._prePassEffectConfiguration = new ScreenSpaceReflections2Configuration(this._useScreenspaceDepth);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
_createBlurAndCombinerPostProcesses() {
|
|
751
|
+
const engine = this._scene.getEngine();
|
|
752
|
+
this._blurPostProcessX = new PostProcess("SSRblurX", ThinSSRBlurPostProcess.FragmentUrl, {
|
|
753
|
+
uniformNames: ThinSSRBlurPostProcess.Uniforms,
|
|
754
|
+
samplerNames: ThinSSRBlurPostProcess.Samplers,
|
|
755
|
+
size: 1 / (this.ssrDownsample + 1),
|
|
756
|
+
samplingMode: 2,
|
|
757
|
+
engine,
|
|
758
|
+
textureType: this._textureType,
|
|
759
|
+
effectWrapper: this._thinSSRRenderingPipeline._ssrBlurXPostProcess,
|
|
760
|
+
});
|
|
761
|
+
this._blurPostProcessX.autoClear = false;
|
|
762
|
+
this._blurPostProcessX.onApplyObservable.add(() => {
|
|
763
|
+
this._thinSSRRenderingPipeline._ssrBlurXPostProcess.textureWidth = this._blurPostProcessX?.inputTexture.width ?? this._scene.getEngine().getRenderWidth();
|
|
764
|
+
this._thinSSRRenderingPipeline._ssrBlurXPostProcess.textureHeight = 1; // not used
|
|
765
|
+
});
|
|
766
|
+
this._blurPostProcessY = new PostProcess("SSRblurY", ThinSSRBlurPostProcess.FragmentUrl, {
|
|
767
|
+
uniformNames: ThinSSRBlurPostProcess.Uniforms,
|
|
768
|
+
samplerNames: ThinSSRBlurPostProcess.Samplers,
|
|
769
|
+
size: 1 / (this.blurDownsample + 1),
|
|
770
|
+
samplingMode: 2,
|
|
771
|
+
engine,
|
|
772
|
+
textureType: this._textureType,
|
|
773
|
+
effectWrapper: this._thinSSRRenderingPipeline._ssrBlurYPostProcess,
|
|
774
|
+
});
|
|
775
|
+
this._blurPostProcessY.autoClear = false;
|
|
776
|
+
this._blurPostProcessY.onApplyObservable.add(() => {
|
|
777
|
+
this._thinSSRRenderingPipeline._ssrBlurYPostProcess.textureWidth = 1; // not used
|
|
778
|
+
this._thinSSRRenderingPipeline._ssrBlurYPostProcess.textureHeight = this._blurPostProcessY?.inputTexture.height ?? this._scene.getEngine().getRenderHeight();
|
|
779
|
+
});
|
|
780
|
+
this._blurCombinerPostProcess = new PostProcess("SSRblurCombiner", ThinSSRBlurCombinerPostProcess.FragmentUrl, {
|
|
781
|
+
uniformNames: ThinSSRBlurCombinerPostProcess.Uniforms,
|
|
782
|
+
samplerNames: ThinSSRBlurCombinerPostProcess.Samplers,
|
|
783
|
+
size: 1 / (this.blurDownsample + 1),
|
|
784
|
+
samplingMode: 1,
|
|
785
|
+
engine,
|
|
786
|
+
textureType: this._textureType,
|
|
787
|
+
effectWrapper: this._thinSSRRenderingPipeline._ssrBlurCombinerPostProcess,
|
|
788
|
+
});
|
|
789
|
+
this._blurCombinerPostProcess.autoClear = false;
|
|
790
|
+
this._blurCombinerPostProcess.onApplyObservable.add((effect) => {
|
|
791
|
+
const geometryBufferRenderer = this._geometryBufferRenderer;
|
|
792
|
+
const prePassRenderer = this._prePassRenderer;
|
|
793
|
+
if (!prePassRenderer && !geometryBufferRenderer) {
|
|
794
|
+
return;
|
|
795
|
+
}
|
|
796
|
+
if (prePassRenderer && this._scene.activeCamera?._getFirstPostProcess() === this._ssrPostProcess) {
|
|
797
|
+
const renderTarget = prePassRenderer.getRenderTarget();
|
|
798
|
+
if (renderTarget && renderTarget.textures) {
|
|
799
|
+
effect.setTexture("mainSampler", renderTarget.textures[prePassRenderer.getIndex(4)]);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
else {
|
|
803
|
+
effect.setTextureFromPostProcess("mainSampler", this._ssrPostProcess);
|
|
804
|
+
}
|
|
805
|
+
if (geometryBufferRenderer) {
|
|
806
|
+
const roughnessIndex = geometryBufferRenderer.getTextureIndex(GeometryBufferRenderer.REFLECTIVITY_TEXTURE_TYPE);
|
|
807
|
+
effect.setTexture("reflectivitySampler", geometryBufferRenderer.getGBuffer().textures[roughnessIndex]);
|
|
808
|
+
if (this.useFresnel) {
|
|
809
|
+
effect.setTexture("normalSampler", geometryBufferRenderer.getGBuffer().textures[1]);
|
|
810
|
+
if (this._useScreenspaceDepth) {
|
|
811
|
+
const depthIndex = geometryBufferRenderer.getTextureIndex(GeometryBufferRenderer.SCREENSPACE_DEPTH_TEXTURE_TYPE);
|
|
812
|
+
effect.setTexture("depthSampler", geometryBufferRenderer.getGBuffer().textures[depthIndex]);
|
|
813
|
+
}
|
|
814
|
+
else {
|
|
815
|
+
effect.setTexture("depthSampler", geometryBufferRenderer.getGBuffer().textures[0]);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
else if (prePassRenderer) {
|
|
820
|
+
const roughnessIndex = prePassRenderer.getIndex(3);
|
|
821
|
+
effect.setTexture("reflectivitySampler", prePassRenderer.getRenderTarget().textures[roughnessIndex]);
|
|
822
|
+
if (this.useFresnel) {
|
|
823
|
+
const depthIndex = prePassRenderer.getIndex(this._useScreenspaceDepth ? 10 : 5);
|
|
824
|
+
const normalIndex = prePassRenderer.getIndex(6);
|
|
825
|
+
effect.setTexture("normalSampler", prePassRenderer.getRenderTarget().textures[normalIndex]);
|
|
826
|
+
effect.setTexture("depthSampler", prePassRenderer.getRenderTarget().textures[depthIndex]);
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Serializes the rendering pipeline (Used when exporting)
|
|
833
|
+
* @returns the serialized object
|
|
834
|
+
*/
|
|
835
|
+
serialize() {
|
|
836
|
+
const serializationObject = SerializationHelper.Serialize(this);
|
|
837
|
+
serializationObject.customType = "SSRRenderingPipeline";
|
|
838
|
+
return serializationObject;
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
(() => {
|
|
842
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
843
|
+
_get_samples_decorators = [serialize()];
|
|
844
|
+
_get_maxDistance_decorators = [serialize()];
|
|
845
|
+
_get_step_decorators = [serialize()];
|
|
846
|
+
_get_thickness_decorators = [serialize()];
|
|
847
|
+
_get_strength_decorators = [serialize()];
|
|
848
|
+
_get_reflectionSpecularFalloffExponent_decorators = [serialize()];
|
|
849
|
+
_get_maxSteps_decorators = [serialize()];
|
|
850
|
+
_get_roughnessFactor_decorators = [serialize()];
|
|
851
|
+
_get_selfCollisionNumSkip_decorators = [serialize()];
|
|
852
|
+
_get_reflectivityThreshold_decorators = [serialize()];
|
|
853
|
+
_get_ssrDownsample_decorators = [serialize()];
|
|
854
|
+
_get_blurDispersionStrength_decorators = [serialize("blurDispersionStrength")];
|
|
855
|
+
_get_blurDownsample_decorators = [serialize("blurDownsample")];
|
|
856
|
+
_get_enableSmoothReflections_decorators = [serialize("enableSmoothReflections")];
|
|
857
|
+
_get_environmentTexture_decorators = [serialize("environmentTexture")];
|
|
858
|
+
_get_environmentTextureIsProbe_decorators = [serialize("environmentTextureIsProbe")];
|
|
859
|
+
_get_attenuateScreenBorders_decorators = [serialize("attenuateScreenBorders")];
|
|
860
|
+
_get_attenuateIntersectionDistance_decorators = [serialize("attenuateIntersectionDistance")];
|
|
861
|
+
_get_attenuateIntersectionIterations_decorators = [serialize("attenuateIntersectionIterations")];
|
|
862
|
+
_get_attenuateFacingCamera_decorators = [serialize("attenuateFacingCamera")];
|
|
863
|
+
_get_attenuateBackfaceReflection_decorators = [serialize("attenuateBackfaceReflection")];
|
|
864
|
+
_get_clipToFrustum_decorators = [serialize("clipToFrustum")];
|
|
865
|
+
_get_useFresnel_decorators = [serialize("useFresnel")];
|
|
866
|
+
_get_enableAutomaticThicknessComputation_decorators = [serialize("enableAutomaticThicknessComputation")];
|
|
867
|
+
__backfaceDepthTextureDownsample_decorators = [serialize("backfaceDepthTextureDownsample")];
|
|
868
|
+
__backfaceForceDepthWriteTransparentMeshes_decorators = [serialize("backfaceForceDepthWriteTransparentMeshes")];
|
|
869
|
+
__isEnabled_decorators = [serialize("isEnabled")];
|
|
870
|
+
_get_inputTextureColorIsInGammaSpace_decorators = [serialize("inputTextureColorIsInGammaSpace")];
|
|
871
|
+
_get_generateOutputInGammaSpace_decorators = [serialize("generateOutputInGammaSpace")];
|
|
872
|
+
_get_debug_decorators = [serialize("debug")];
|
|
873
|
+
__esDecorate(_a, null, _get_samples_decorators, { kind: "getter", name: "samples", static: false, private: false, access: { has: obj => "samples" in obj, get: obj => obj.samples }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
874
|
+
__esDecorate(_a, null, _get_maxDistance_decorators, { kind: "getter", name: "maxDistance", static: false, private: false, access: { has: obj => "maxDistance" in obj, get: obj => obj.maxDistance }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
875
|
+
__esDecorate(_a, null, _get_step_decorators, { kind: "getter", name: "step", static: false, private: false, access: { has: obj => "step" in obj, get: obj => obj.step }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
876
|
+
__esDecorate(_a, null, _get_thickness_decorators, { kind: "getter", name: "thickness", static: false, private: false, access: { has: obj => "thickness" in obj, get: obj => obj.thickness }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
877
|
+
__esDecorate(_a, null, _get_strength_decorators, { kind: "getter", name: "strength", static: false, private: false, access: { has: obj => "strength" in obj, get: obj => obj.strength }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
878
|
+
__esDecorate(_a, null, _get_reflectionSpecularFalloffExponent_decorators, { kind: "getter", name: "reflectionSpecularFalloffExponent", static: false, private: false, access: { has: obj => "reflectionSpecularFalloffExponent" in obj, get: obj => obj.reflectionSpecularFalloffExponent }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
879
|
+
__esDecorate(_a, null, _get_maxSteps_decorators, { kind: "getter", name: "maxSteps", static: false, private: false, access: { has: obj => "maxSteps" in obj, get: obj => obj.maxSteps }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
880
|
+
__esDecorate(_a, null, _get_roughnessFactor_decorators, { kind: "getter", name: "roughnessFactor", static: false, private: false, access: { has: obj => "roughnessFactor" in obj, get: obj => obj.roughnessFactor }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
881
|
+
__esDecorate(_a, null, _get_selfCollisionNumSkip_decorators, { kind: "getter", name: "selfCollisionNumSkip", static: false, private: false, access: { has: obj => "selfCollisionNumSkip" in obj, get: obj => obj.selfCollisionNumSkip }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
882
|
+
__esDecorate(_a, null, _get_reflectivityThreshold_decorators, { kind: "getter", name: "reflectivityThreshold", static: false, private: false, access: { has: obj => "reflectivityThreshold" in obj, get: obj => obj.reflectivityThreshold }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
883
|
+
__esDecorate(_a, null, _get_ssrDownsample_decorators, { kind: "getter", name: "ssrDownsample", static: false, private: false, access: { has: obj => "ssrDownsample" in obj, get: obj => obj.ssrDownsample }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
884
|
+
__esDecorate(_a, null, _get_blurDispersionStrength_decorators, { kind: "getter", name: "blurDispersionStrength", static: false, private: false, access: { has: obj => "blurDispersionStrength" in obj, get: obj => obj.blurDispersionStrength }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
885
|
+
__esDecorate(_a, null, _get_blurDownsample_decorators, { kind: "getter", name: "blurDownsample", static: false, private: false, access: { has: obj => "blurDownsample" in obj, get: obj => obj.blurDownsample }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
886
|
+
__esDecorate(_a, null, _get_enableSmoothReflections_decorators, { kind: "getter", name: "enableSmoothReflections", static: false, private: false, access: { has: obj => "enableSmoothReflections" in obj, get: obj => obj.enableSmoothReflections }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
887
|
+
__esDecorate(_a, null, _get_environmentTexture_decorators, { kind: "getter", name: "environmentTexture", static: false, private: false, access: { has: obj => "environmentTexture" in obj, get: obj => obj.environmentTexture }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
888
|
+
__esDecorate(_a, null, _get_environmentTextureIsProbe_decorators, { kind: "getter", name: "environmentTextureIsProbe", static: false, private: false, access: { has: obj => "environmentTextureIsProbe" in obj, get: obj => obj.environmentTextureIsProbe }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
889
|
+
__esDecorate(_a, null, _get_attenuateScreenBorders_decorators, { kind: "getter", name: "attenuateScreenBorders", static: false, private: false, access: { has: obj => "attenuateScreenBorders" in obj, get: obj => obj.attenuateScreenBorders }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
890
|
+
__esDecorate(_a, null, _get_attenuateIntersectionDistance_decorators, { kind: "getter", name: "attenuateIntersectionDistance", static: false, private: false, access: { has: obj => "attenuateIntersectionDistance" in obj, get: obj => obj.attenuateIntersectionDistance }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
891
|
+
__esDecorate(_a, null, _get_attenuateIntersectionIterations_decorators, { kind: "getter", name: "attenuateIntersectionIterations", static: false, private: false, access: { has: obj => "attenuateIntersectionIterations" in obj, get: obj => obj.attenuateIntersectionIterations }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
892
|
+
__esDecorate(_a, null, _get_attenuateFacingCamera_decorators, { kind: "getter", name: "attenuateFacingCamera", static: false, private: false, access: { has: obj => "attenuateFacingCamera" in obj, get: obj => obj.attenuateFacingCamera }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
893
|
+
__esDecorate(_a, null, _get_attenuateBackfaceReflection_decorators, { kind: "getter", name: "attenuateBackfaceReflection", static: false, private: false, access: { has: obj => "attenuateBackfaceReflection" in obj, get: obj => obj.attenuateBackfaceReflection }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
894
|
+
__esDecorate(_a, null, _get_clipToFrustum_decorators, { kind: "getter", name: "clipToFrustum", static: false, private: false, access: { has: obj => "clipToFrustum" in obj, get: obj => obj.clipToFrustum }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
895
|
+
__esDecorate(_a, null, _get_useFresnel_decorators, { kind: "getter", name: "useFresnel", static: false, private: false, access: { has: obj => "useFresnel" in obj, get: obj => obj.useFresnel }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
896
|
+
__esDecorate(_a, null, _get_enableAutomaticThicknessComputation_decorators, { kind: "getter", name: "enableAutomaticThicknessComputation", static: false, private: false, access: { has: obj => "enableAutomaticThicknessComputation" in obj, get: obj => obj.enableAutomaticThicknessComputation }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
897
|
+
__esDecorate(_a, null, _get_inputTextureColorIsInGammaSpace_decorators, { kind: "getter", name: "inputTextureColorIsInGammaSpace", static: false, private: false, access: { has: obj => "inputTextureColorIsInGammaSpace" in obj, get: obj => obj.inputTextureColorIsInGammaSpace }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
898
|
+
__esDecorate(_a, null, _get_generateOutputInGammaSpace_decorators, { kind: "getter", name: "generateOutputInGammaSpace", static: false, private: false, access: { has: obj => "generateOutputInGammaSpace" in obj, get: obj => obj.generateOutputInGammaSpace }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
899
|
+
__esDecorate(_a, null, _get_debug_decorators, { kind: "getter", name: "debug", static: false, private: false, access: { has: obj => "debug" in obj, get: obj => obj.debug }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
900
|
+
__esDecorate(null, null, __backfaceDepthTextureDownsample_decorators, { kind: "field", name: "_backfaceDepthTextureDownsample", static: false, private: false, access: { has: obj => "_backfaceDepthTextureDownsample" in obj, get: obj => obj._backfaceDepthTextureDownsample, set: (obj, value) => { obj._backfaceDepthTextureDownsample = value; } }, metadata: _metadata }, __backfaceDepthTextureDownsample_initializers, __backfaceDepthTextureDownsample_extraInitializers);
|
|
901
|
+
__esDecorate(null, null, __backfaceForceDepthWriteTransparentMeshes_decorators, { kind: "field", name: "_backfaceForceDepthWriteTransparentMeshes", static: false, private: false, access: { has: obj => "_backfaceForceDepthWriteTransparentMeshes" in obj, get: obj => obj._backfaceForceDepthWriteTransparentMeshes, set: (obj, value) => { obj._backfaceForceDepthWriteTransparentMeshes = value; } }, metadata: _metadata }, __backfaceForceDepthWriteTransparentMeshes_initializers, __backfaceForceDepthWriteTransparentMeshes_extraInitializers);
|
|
902
|
+
__esDecorate(null, null, __isEnabled_decorators, { kind: "field", name: "_isEnabled", static: false, private: false, access: { has: obj => "_isEnabled" in obj, get: obj => obj._isEnabled, set: (obj, value) => { obj._isEnabled = value; } }, metadata: _metadata }, __isEnabled_initializers, __isEnabled_extraInitializers);
|
|
903
|
+
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
904
|
+
})(),
|
|
905
|
+
_a;
|
|
906
|
+
})();
|
|
907
|
+
export { SSRRenderingPipeline };
|
|
891
908
|
let _Registered = false;
|
|
892
909
|
/**
|
|
893
910
|
* Parse the serialized pipeline
|