@onerjs/core 8.53.4 → 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, serializeAsTexture } from "../../../Misc/decorators.js";
|
|
4
4
|
import { SerializationHelper } from "../../../Misc/decorators.serialization.js";
|
|
5
5
|
import { Logger } from "../../../Misc/logger.js";
|
|
@@ -23,1121 +23,1183 @@ import { DepthRenderer } from "../../../Rendering/depthRenderer.pure.js";
|
|
|
23
23
|
* Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
|
|
24
24
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/standardRenderingPipeline
|
|
25
25
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
26
|
+
let StandardRenderingPipeline = (() => {
|
|
27
|
+
var _a;
|
|
28
|
+
let _classSuper = PostProcessRenderPipeline;
|
|
29
|
+
let _instanceExtraInitializers = [];
|
|
30
|
+
let _brightThreshold_decorators;
|
|
31
|
+
let _brightThreshold_initializers = [];
|
|
32
|
+
let _brightThreshold_extraInitializers = [];
|
|
33
|
+
let _blurWidth_decorators;
|
|
34
|
+
let _blurWidth_initializers = [];
|
|
35
|
+
let _blurWidth_extraInitializers = [];
|
|
36
|
+
let _horizontalBlur_decorators;
|
|
37
|
+
let _horizontalBlur_initializers = [];
|
|
38
|
+
let _horizontalBlur_extraInitializers = [];
|
|
39
|
+
let _get_exposure_decorators;
|
|
40
|
+
let _lensTexture_decorators;
|
|
41
|
+
let _lensTexture_initializers = [];
|
|
42
|
+
let _lensTexture_extraInitializers = [];
|
|
43
|
+
let _volumetricLightCoefficient_decorators;
|
|
44
|
+
let _volumetricLightCoefficient_initializers = [];
|
|
45
|
+
let _volumetricLightCoefficient_extraInitializers = [];
|
|
46
|
+
let _volumetricLightPower_decorators;
|
|
47
|
+
let _volumetricLightPower_initializers = [];
|
|
48
|
+
let _volumetricLightPower_extraInitializers = [];
|
|
49
|
+
let _volumetricLightBlurScale_decorators;
|
|
50
|
+
let _volumetricLightBlurScale_initializers = [];
|
|
51
|
+
let _volumetricLightBlurScale_extraInitializers = [];
|
|
52
|
+
let _hdrMinimumLuminance_decorators;
|
|
53
|
+
let _hdrMinimumLuminance_initializers = [];
|
|
54
|
+
let _hdrMinimumLuminance_extraInitializers = [];
|
|
55
|
+
let _hdrDecreaseRate_decorators;
|
|
56
|
+
let _hdrDecreaseRate_initializers = [];
|
|
57
|
+
let _hdrDecreaseRate_extraInitializers = [];
|
|
58
|
+
let _hdrIncreaseRate_decorators;
|
|
59
|
+
let _hdrIncreaseRate_initializers = [];
|
|
60
|
+
let _hdrIncreaseRate_extraInitializers = [];
|
|
61
|
+
let _get_hdrAutoExposure_decorators;
|
|
62
|
+
let _lensColorTexture_decorators;
|
|
63
|
+
let _lensColorTexture_initializers = [];
|
|
64
|
+
let _lensColorTexture_extraInitializers = [];
|
|
65
|
+
let _lensFlareStrength_decorators;
|
|
66
|
+
let _lensFlareStrength_initializers = [];
|
|
67
|
+
let _lensFlareStrength_extraInitializers = [];
|
|
68
|
+
let _lensFlareGhostDispersal_decorators;
|
|
69
|
+
let _lensFlareGhostDispersal_initializers = [];
|
|
70
|
+
let _lensFlareGhostDispersal_extraInitializers = [];
|
|
71
|
+
let _lensFlareHaloWidth_decorators;
|
|
72
|
+
let _lensFlareHaloWidth_initializers = [];
|
|
73
|
+
let _lensFlareHaloWidth_extraInitializers = [];
|
|
74
|
+
let _lensFlareDistortionStrength_decorators;
|
|
75
|
+
let _lensFlareDistortionStrength_initializers = [];
|
|
76
|
+
let _lensFlareDistortionStrength_extraInitializers = [];
|
|
77
|
+
let _lensFlareBlurWidth_decorators;
|
|
78
|
+
let _lensFlareBlurWidth_initializers = [];
|
|
79
|
+
let _lensFlareBlurWidth_extraInitializers = [];
|
|
80
|
+
let _lensStarTexture_decorators;
|
|
81
|
+
let _lensStarTexture_initializers = [];
|
|
82
|
+
let _lensStarTexture_extraInitializers = [];
|
|
83
|
+
let _lensFlareDirtTexture_decorators;
|
|
84
|
+
let _lensFlareDirtTexture_initializers = [];
|
|
85
|
+
let _lensFlareDirtTexture_extraInitializers = [];
|
|
86
|
+
let _depthOfFieldDistance_decorators;
|
|
87
|
+
let _depthOfFieldDistance_initializers = [];
|
|
88
|
+
let _depthOfFieldDistance_extraInitializers = [];
|
|
89
|
+
let _depthOfFieldBlurWidth_decorators;
|
|
90
|
+
let _depthOfFieldBlurWidth_initializers = [];
|
|
91
|
+
let _depthOfFieldBlurWidth_extraInitializers = [];
|
|
92
|
+
let _get_motionStrength_decorators;
|
|
93
|
+
let _get_objectBasedMotionBlur_decorators;
|
|
94
|
+
let __ratio_decorators;
|
|
95
|
+
let __ratio_initializers = [];
|
|
96
|
+
let __ratio_extraInitializers = [];
|
|
97
|
+
let _get_BloomEnabled_decorators;
|
|
98
|
+
let _get_DepthOfFieldEnabled_decorators;
|
|
99
|
+
let _get_LensFlareEnabled_decorators;
|
|
100
|
+
let _get_HDREnabled_decorators;
|
|
101
|
+
let _get_VLSEnabled_decorators;
|
|
102
|
+
let _get_MotionBlurEnabled_decorators;
|
|
103
|
+
let _get_fxaaEnabled_decorators;
|
|
104
|
+
let _get_screenSpaceReflectionsEnabled_decorators;
|
|
105
|
+
let _get_volumetricLightStepsCount_decorators;
|
|
106
|
+
let _get_motionBlurSamples_decorators;
|
|
107
|
+
let _get_samples_decorators;
|
|
108
|
+
return _a = class StandardRenderingPipeline extends _classSuper {
|
|
109
|
+
/**
|
|
110
|
+
* Gets the overall exposure used by the pipeline
|
|
111
|
+
*/
|
|
112
|
+
get exposure() {
|
|
113
|
+
return this._fixedExposure;
|
|
55
114
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
get motionStrength() {
|
|
63
|
-
return this._motionStrength;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Sets how much the image is blurred by the movement while using the motion blur post-process
|
|
67
|
-
*/
|
|
68
|
-
set motionStrength(strength) {
|
|
69
|
-
this._motionStrength = strength;
|
|
70
|
-
if (this._isObjectBasedMotionBlur && this.motionBlurPostProcess) {
|
|
71
|
-
this.motionBlurPostProcess.motionStrength = strength;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Gets whether or not the motion blur post-process is object based or screen based.
|
|
76
|
-
*/
|
|
77
|
-
get objectBasedMotionBlur() {
|
|
78
|
-
return this._isObjectBasedMotionBlur;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Sets whether or not the motion blur post-process should be object based or screen based
|
|
82
|
-
*/
|
|
83
|
-
set objectBasedMotionBlur(value) {
|
|
84
|
-
const shouldRebuild = this._isObjectBasedMotionBlur !== value;
|
|
85
|
-
this._isObjectBasedMotionBlur = value;
|
|
86
|
-
if (shouldRebuild) {
|
|
87
|
-
this._buildPipeline();
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* @ignore
|
|
92
|
-
* Specifies if the bloom pipeline is enabled
|
|
93
|
-
*/
|
|
94
|
-
get BloomEnabled() {
|
|
95
|
-
return this._bloomEnabled;
|
|
96
|
-
}
|
|
97
|
-
set BloomEnabled(enabled) {
|
|
98
|
-
if (this._bloomEnabled === enabled) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
this._bloomEnabled = enabled;
|
|
102
|
-
this._buildPipeline();
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* @ignore
|
|
106
|
-
* Specifies if the depth of field pipeline is enabled
|
|
107
|
-
*/
|
|
108
|
-
get DepthOfFieldEnabled() {
|
|
109
|
-
return this._depthOfFieldEnabled;
|
|
110
|
-
}
|
|
111
|
-
set DepthOfFieldEnabled(enabled) {
|
|
112
|
-
if (this._depthOfFieldEnabled === enabled) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
this._depthOfFieldEnabled = enabled;
|
|
116
|
-
this._buildPipeline();
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* @ignore
|
|
120
|
-
* Specifies if the lens flare pipeline is enabled
|
|
121
|
-
*/
|
|
122
|
-
get LensFlareEnabled() {
|
|
123
|
-
return this._lensFlareEnabled;
|
|
124
|
-
}
|
|
125
|
-
set LensFlareEnabled(enabled) {
|
|
126
|
-
if (this._lensFlareEnabled === enabled) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
this._lensFlareEnabled = enabled;
|
|
130
|
-
this._buildPipeline();
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* @ignore
|
|
134
|
-
* Specifies if the HDR pipeline is enabled
|
|
135
|
-
*/
|
|
136
|
-
get HDREnabled() {
|
|
137
|
-
return this._hdrEnabled;
|
|
138
|
-
}
|
|
139
|
-
set HDREnabled(enabled) {
|
|
140
|
-
if (this._hdrEnabled === enabled) {
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
this._hdrEnabled = enabled;
|
|
144
|
-
this._buildPipeline();
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* @ignore
|
|
148
|
-
* Specifies if the volumetric lights scattering effect is enabled
|
|
149
|
-
*/
|
|
150
|
-
get VLSEnabled() {
|
|
151
|
-
return this._vlsEnabled;
|
|
152
|
-
}
|
|
153
|
-
set VLSEnabled(enabled) {
|
|
154
|
-
if (this._vlsEnabled === enabled) {
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
if (enabled) {
|
|
158
|
-
const geometry = this._scene.enableGeometryBufferRenderer();
|
|
159
|
-
if (!geometry) {
|
|
160
|
-
Logger.Warn("Geometry renderer is not supported, cannot create volumetric lights in Standard Rendering Pipeline");
|
|
161
|
-
return;
|
|
115
|
+
/**
|
|
116
|
+
* Sets the overall exposure used by the pipeline
|
|
117
|
+
*/
|
|
118
|
+
set exposure(value) {
|
|
119
|
+
this._fixedExposure = value;
|
|
120
|
+
this._currentExposure = value;
|
|
162
121
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
* @ignore
|
|
169
|
-
* Specifies if the motion blur effect is enabled
|
|
170
|
-
*/
|
|
171
|
-
get MotionBlurEnabled() {
|
|
172
|
-
return this._motionBlurEnabled;
|
|
173
|
-
}
|
|
174
|
-
set MotionBlurEnabled(enabled) {
|
|
175
|
-
if (this._motionBlurEnabled === enabled) {
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
this._motionBlurEnabled = enabled;
|
|
179
|
-
this._buildPipeline();
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Specifies if anti-aliasing is enabled
|
|
183
|
-
*/
|
|
184
|
-
get fxaaEnabled() {
|
|
185
|
-
return this._fxaaEnabled;
|
|
186
|
-
}
|
|
187
|
-
set fxaaEnabled(enabled) {
|
|
188
|
-
if (this._fxaaEnabled === enabled) {
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
this._fxaaEnabled = enabled;
|
|
192
|
-
this._buildPipeline();
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Specifies if screen space reflections are enabled.
|
|
196
|
-
*/
|
|
197
|
-
get screenSpaceReflectionsEnabled() {
|
|
198
|
-
return this._screenSpaceReflectionsEnabled;
|
|
199
|
-
}
|
|
200
|
-
set screenSpaceReflectionsEnabled(enabled) {
|
|
201
|
-
if (this._screenSpaceReflectionsEnabled === enabled) {
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
this._screenSpaceReflectionsEnabled = enabled;
|
|
205
|
-
this._buildPipeline();
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Specifies the number of steps used to calculate the volumetric lights
|
|
209
|
-
* Typically in interval [50, 200]
|
|
210
|
-
*/
|
|
211
|
-
get volumetricLightStepsCount() {
|
|
212
|
-
return this._volumetricLightStepsCount;
|
|
213
|
-
}
|
|
214
|
-
set volumetricLightStepsCount(count) {
|
|
215
|
-
if (this.volumetricLightPostProcess) {
|
|
216
|
-
this.volumetricLightPostProcess.updateEffect("#define VLS\n#define NB_STEPS " + count.toFixed(1));
|
|
217
|
-
}
|
|
218
|
-
this._volumetricLightStepsCount = count;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Specifies the number of samples used for the motion blur effect
|
|
222
|
-
* Typically in interval [16, 64]
|
|
223
|
-
*/
|
|
224
|
-
get motionBlurSamples() {
|
|
225
|
-
return this._motionBlurSamples;
|
|
226
|
-
}
|
|
227
|
-
set motionBlurSamples(samples) {
|
|
228
|
-
if (this.motionBlurPostProcess) {
|
|
229
|
-
if (this._isObjectBasedMotionBlur) {
|
|
230
|
-
this.motionBlurPostProcess.motionBlurSamples = samples;
|
|
122
|
+
/**
|
|
123
|
+
* Gets whether or not the exposure of the overall pipeline should be automatically adjusted by the HDR post-process
|
|
124
|
+
*/
|
|
125
|
+
get hdrAutoExposure() {
|
|
126
|
+
return this._hdrAutoExposure;
|
|
231
127
|
}
|
|
232
|
-
|
|
233
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Sets whether or not the exposure of the overall pipeline should be automatically adjusted by the HDR post-process
|
|
130
|
+
*/
|
|
131
|
+
set hdrAutoExposure(value) {
|
|
132
|
+
this._hdrAutoExposure = value;
|
|
133
|
+
if (this.hdrPostProcess) {
|
|
134
|
+
const defines = ["#define HDR"];
|
|
135
|
+
if (value) {
|
|
136
|
+
defines.push("#define AUTO_EXPOSURE");
|
|
137
|
+
}
|
|
138
|
+
this.hdrPostProcess.updateEffect(defines.join("\n"));
|
|
139
|
+
}
|
|
234
140
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
this._samples = sampleCount;
|
|
249
|
-
this._buildPipeline();
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
|
|
253
|
-
* @constructor
|
|
254
|
-
* @param name The rendering pipeline name
|
|
255
|
-
* @param scene The scene linked to this pipeline
|
|
256
|
-
* @param ratio The size of the postprocesses (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)
|
|
257
|
-
* @param originalPostProcess the custom original color post-process. Must be "reusable". Can be null.
|
|
258
|
-
* @param cameras The array of cameras that the rendering pipeline will be attached to
|
|
259
|
-
*/
|
|
260
|
-
constructor(name, scene, ratio, originalPostProcess = null, cameras) {
|
|
261
|
-
RegisterDepthRendererSceneComponent(DepthRenderer);
|
|
262
|
-
super(scene.getEngine(), name);
|
|
263
|
-
/**
|
|
264
|
-
* Post-process used to down scale an image x4
|
|
265
|
-
*/
|
|
266
|
-
this.downSampleX4PostProcess = null;
|
|
267
|
-
/**
|
|
268
|
-
* Post-process used to calculate the illuminated surfaces controlled by a threshold
|
|
269
|
-
*/
|
|
270
|
-
this.brightPassPostProcess = null;
|
|
271
|
-
/**
|
|
272
|
-
* Post-process array storing all the horizontal blur post-processes used by the pipeline
|
|
273
|
-
*/
|
|
274
|
-
this.blurHPostProcesses = [];
|
|
275
|
-
/**
|
|
276
|
-
* Post-process array storing all the vertical blur post-processes used by the pipeline
|
|
277
|
-
*/
|
|
278
|
-
this.blurVPostProcesses = [];
|
|
279
|
-
/**
|
|
280
|
-
* Post-process used to add colors of 2 textures (typically brightness + real scene color)
|
|
281
|
-
*/
|
|
282
|
-
this.textureAdderPostProcess = null;
|
|
283
|
-
/**
|
|
284
|
-
* Post-process used to create volumetric lighting effect
|
|
285
|
-
*/
|
|
286
|
-
this.volumetricLightPostProcess = null;
|
|
287
|
-
/**
|
|
288
|
-
* Post-process used to smooth the previous volumetric light post-process on the X axis
|
|
289
|
-
*/
|
|
290
|
-
this.volumetricLightSmoothXPostProcess = null;
|
|
291
|
-
/**
|
|
292
|
-
* Post-process used to smooth the previous volumetric light post-process on the Y axis
|
|
293
|
-
*/
|
|
294
|
-
this.volumetricLightSmoothYPostProcess = null;
|
|
295
|
-
/**
|
|
296
|
-
* Post-process used to merge the volumetric light effect and the real scene color
|
|
297
|
-
*/
|
|
298
|
-
this.volumetricLightMergePostProces = null;
|
|
299
|
-
/**
|
|
300
|
-
* Post-process used to store the final volumetric light post-process (attach/detach for debug purpose)
|
|
301
|
-
*/
|
|
302
|
-
this.volumetricLightFinalPostProcess = null;
|
|
303
|
-
/**
|
|
304
|
-
* Base post-process used to calculate the average luminance of the final image for HDR
|
|
305
|
-
*/
|
|
306
|
-
this.luminancePostProcess = null;
|
|
307
|
-
/**
|
|
308
|
-
* Post-processes used to create down sample post-processes in order to get
|
|
309
|
-
* the average luminance of the final image for HDR
|
|
310
|
-
* Array of length "StandardRenderingPipeline.LuminanceSteps"
|
|
311
|
-
*/
|
|
312
|
-
this.luminanceDownSamplePostProcesses = [];
|
|
313
|
-
/**
|
|
314
|
-
* Post-process used to create a HDR effect (light adaptation)
|
|
315
|
-
*/
|
|
316
|
-
this.hdrPostProcess = null;
|
|
317
|
-
/**
|
|
318
|
-
* Post-process used to store the final texture adder post-process (attach/detach for debug purpose)
|
|
319
|
-
*/
|
|
320
|
-
this.textureAdderFinalPostProcess = null;
|
|
321
|
-
/**
|
|
322
|
-
* Post-process used to store the final lens flare post-process (attach/detach for debug purpose)
|
|
323
|
-
*/
|
|
324
|
-
this.lensFlareFinalPostProcess = null;
|
|
325
|
-
/**
|
|
326
|
-
* Post-process used to merge the final HDR post-process and the real scene color
|
|
327
|
-
*/
|
|
328
|
-
this.hdrFinalPostProcess = null;
|
|
329
|
-
/**
|
|
330
|
-
* Post-process used to create a lens flare effect
|
|
331
|
-
*/
|
|
332
|
-
this.lensFlarePostProcess = null;
|
|
333
|
-
/**
|
|
334
|
-
* Post-process that merges the result of the lens flare post-process and the real scene color
|
|
335
|
-
*/
|
|
336
|
-
this.lensFlareComposePostProcess = null;
|
|
337
|
-
/**
|
|
338
|
-
* Post-process used to create a motion blur effect
|
|
339
|
-
*/
|
|
340
|
-
this.motionBlurPostProcess = null;
|
|
341
|
-
/**
|
|
342
|
-
* Post-process used to create a depth of field effect
|
|
343
|
-
*/
|
|
344
|
-
this.depthOfFieldPostProcess = null;
|
|
345
|
-
/**
|
|
346
|
-
* The Fast Approximate Anti-Aliasing post process which attempts to remove aliasing from an image.
|
|
347
|
-
*/
|
|
348
|
-
this.fxaaPostProcess = null;
|
|
349
|
-
/**
|
|
350
|
-
* Post-process used to simulate realtime reflections using the screen space and geometry renderer.
|
|
351
|
-
*/
|
|
352
|
-
this.screenSpaceReflectionPostProcess = null;
|
|
353
|
-
// Values
|
|
354
|
-
/**
|
|
355
|
-
* Represents the brightness threshold in order to configure the illuminated surfaces
|
|
356
|
-
*/
|
|
357
|
-
this.brightThreshold = 1.0;
|
|
358
|
-
/**
|
|
359
|
-
* Configures the blur intensity used for surexposed surfaces are highlighted surfaces (light halo)
|
|
360
|
-
*/
|
|
361
|
-
this.blurWidth = 512.0;
|
|
362
|
-
/**
|
|
363
|
-
* Sets if the blur for highlighted surfaces must be only horizontal
|
|
364
|
-
*/
|
|
365
|
-
this.horizontalBlur = false;
|
|
366
|
-
/**
|
|
367
|
-
* Texture used typically to simulate "dirty" on camera lens
|
|
368
|
-
*/
|
|
369
|
-
this.lensTexture = null;
|
|
370
|
-
/**
|
|
371
|
-
* Represents the offset coefficient based on Rayleigh principle. Typically in interval [-0.2, 0.2]
|
|
372
|
-
*/
|
|
373
|
-
this.volumetricLightCoefficient = 0.2;
|
|
374
|
-
/**
|
|
375
|
-
* The overall power of volumetric lights, typically in interval [0, 10] maximum
|
|
376
|
-
*/
|
|
377
|
-
this.volumetricLightPower = 4.0;
|
|
378
|
-
/**
|
|
379
|
-
* Used the set the blur intensity to smooth the volumetric lights
|
|
380
|
-
*/
|
|
381
|
-
this.volumetricLightBlurScale = 64.0;
|
|
382
|
-
/**
|
|
383
|
-
* Light (spot or directional) used to generate the volumetric lights rays
|
|
384
|
-
* The source light must have a shadow generate so the pipeline can get its
|
|
385
|
-
* depth map
|
|
386
|
-
*/
|
|
387
|
-
this.sourceLight = null;
|
|
388
|
-
/**
|
|
389
|
-
* For eye adaptation, represents the minimum luminance the eye can see
|
|
390
|
-
*/
|
|
391
|
-
this.hdrMinimumLuminance = 1.0;
|
|
392
|
-
/**
|
|
393
|
-
* For eye adaptation, represents the decrease luminance speed
|
|
394
|
-
*/
|
|
395
|
-
this.hdrDecreaseRate = 0.5;
|
|
396
|
-
/**
|
|
397
|
-
* For eye adaptation, represents the increase luminance speed
|
|
398
|
-
*/
|
|
399
|
-
this.hdrIncreaseRate = 0.5;
|
|
400
|
-
/**
|
|
401
|
-
* Lens color texture used by the lens flare effect. Mandatory if lens flare effect enabled
|
|
402
|
-
*/
|
|
403
|
-
this.lensColorTexture = null;
|
|
404
|
-
/**
|
|
405
|
-
* The overall strength for the lens flare effect
|
|
406
|
-
*/
|
|
407
|
-
this.lensFlareStrength = 20.0;
|
|
408
|
-
/**
|
|
409
|
-
* Dispersion coefficient for lens flare ghosts
|
|
410
|
-
*/
|
|
411
|
-
this.lensFlareGhostDispersal = 1.4;
|
|
412
|
-
/**
|
|
413
|
-
* Main lens flare halo width
|
|
414
|
-
*/
|
|
415
|
-
this.lensFlareHaloWidth = 0.7;
|
|
416
|
-
/**
|
|
417
|
-
* Based on the lens distortion effect, defines how much the lens flare result
|
|
418
|
-
* is distorted
|
|
419
|
-
*/
|
|
420
|
-
this.lensFlareDistortionStrength = 16.0;
|
|
421
|
-
/**
|
|
422
|
-
* Configures the blur intensity used for for lens flare (halo)
|
|
423
|
-
*/
|
|
424
|
-
this.lensFlareBlurWidth = 512.0;
|
|
425
|
-
/**
|
|
426
|
-
* Lens star texture must be used to simulate rays on the flares and is available
|
|
427
|
-
* in the documentation
|
|
428
|
-
*/
|
|
429
|
-
this.lensStarTexture = null;
|
|
430
|
-
/**
|
|
431
|
-
* As the "lensTexture" (can be the same texture or different), it is used to apply the lens
|
|
432
|
-
* flare effect by taking account of the dirt texture
|
|
433
|
-
*/
|
|
434
|
-
this.lensFlareDirtTexture = null;
|
|
435
|
-
/**
|
|
436
|
-
* Represents the focal length for the depth of field effect
|
|
437
|
-
*/
|
|
438
|
-
this.depthOfFieldDistance = 10.0;
|
|
439
|
-
/**
|
|
440
|
-
* Represents the blur intensity for the blurred part of the depth of field effect
|
|
441
|
-
*/
|
|
442
|
-
this.depthOfFieldBlurWidth = 64.0;
|
|
443
|
-
/**
|
|
444
|
-
* List of animations for the pipeline (IAnimatable implementation)
|
|
445
|
-
*/
|
|
446
|
-
this.animations = [];
|
|
447
|
-
this._currentDepthOfFieldSource = null;
|
|
448
|
-
this._fixedExposure = 1.0;
|
|
449
|
-
this._currentExposure = 1.0;
|
|
450
|
-
this._hdrAutoExposure = false;
|
|
451
|
-
this._hdrCurrentLuminance = 1.0;
|
|
452
|
-
this._motionStrength = 1.0;
|
|
453
|
-
this._isObjectBasedMotionBlur = false;
|
|
454
|
-
this._camerasToBeAttached = [];
|
|
455
|
-
// Getters and setters
|
|
456
|
-
this._bloomEnabled = false;
|
|
457
|
-
this._depthOfFieldEnabled = false;
|
|
458
|
-
this._vlsEnabled = false;
|
|
459
|
-
this._lensFlareEnabled = false;
|
|
460
|
-
this._hdrEnabled = false;
|
|
461
|
-
this._motionBlurEnabled = false;
|
|
462
|
-
this._fxaaEnabled = false;
|
|
463
|
-
this._screenSpaceReflectionsEnabled = false;
|
|
464
|
-
this._motionBlurSamples = 64.0;
|
|
465
|
-
this._volumetricLightStepsCount = 50.0;
|
|
466
|
-
this._samples = 1;
|
|
467
|
-
this._cameras = cameras || scene.cameras;
|
|
468
|
-
this._cameras = this._cameras.slice();
|
|
469
|
-
this._camerasToBeAttached = this._cameras.slice();
|
|
470
|
-
// Initialize
|
|
471
|
-
this._scene = scene;
|
|
472
|
-
this._basePostProcess = originalPostProcess;
|
|
473
|
-
this._ratio = ratio;
|
|
474
|
-
// Misc
|
|
475
|
-
this._floatTextureType = scene.getEngine().getCaps().textureFloatRender ? 1 : 2;
|
|
476
|
-
// Finish
|
|
477
|
-
scene.postProcessRenderPipelineManager.addPipeline(this);
|
|
478
|
-
this._buildPipeline();
|
|
479
|
-
}
|
|
480
|
-
_buildPipeline() {
|
|
481
|
-
const ratio = this._ratio;
|
|
482
|
-
const scene = this._scene;
|
|
483
|
-
this._disposePostProcesses();
|
|
484
|
-
if (this._cameras !== null) {
|
|
485
|
-
this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
|
|
486
|
-
// get back cameras to be used to reattach pipeline
|
|
487
|
-
this._cameras = this._camerasToBeAttached.slice();
|
|
488
|
-
}
|
|
489
|
-
this._reset();
|
|
490
|
-
// Create pass post-process
|
|
491
|
-
if (this._screenSpaceReflectionsEnabled) {
|
|
492
|
-
this.screenSpaceReflectionPostProcess = new ScreenSpaceReflectionPostProcess("HDRPass", scene, ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, this._floatTextureType);
|
|
493
|
-
this.screenSpaceReflectionPostProcess.onApplyObservable.add(() => {
|
|
494
|
-
this._currentDepthOfFieldSource = this.screenSpaceReflectionPostProcess;
|
|
495
|
-
});
|
|
496
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRScreenSpaceReflections", () => this.screenSpaceReflectionPostProcess, true));
|
|
497
|
-
}
|
|
498
|
-
if (!this._basePostProcess) {
|
|
499
|
-
this.originalPostProcess = new PostProcess("HDRPass", "standard", [], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define PASS_POST_PROCESS", this._floatTextureType);
|
|
500
|
-
}
|
|
501
|
-
else {
|
|
502
|
-
this.originalPostProcess = this._basePostProcess;
|
|
503
|
-
}
|
|
504
|
-
this.originalPostProcess.autoClear = !this.screenSpaceReflectionPostProcess;
|
|
505
|
-
this.originalPostProcess.onApplyObservable.add(() => {
|
|
506
|
-
this._currentDepthOfFieldSource = this.originalPostProcess;
|
|
507
|
-
});
|
|
508
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRPassPostProcess", () => this.originalPostProcess, true));
|
|
509
|
-
if (this._bloomEnabled) {
|
|
510
|
-
// Create down sample X4 post-process
|
|
511
|
-
this._createDownSampleX4PostProcess(scene, ratio / 4);
|
|
512
|
-
// Create bright pass post-process
|
|
513
|
-
this._createBrightPassPostProcess(scene, ratio / 4);
|
|
514
|
-
// Create gaussian blur post-processes (down sampling blurs)
|
|
515
|
-
this._createBlurPostProcesses(scene, ratio / 4, 1);
|
|
516
|
-
// Create texture adder post-process
|
|
517
|
-
this._createTextureAdderPostProcess(scene, ratio);
|
|
518
|
-
// Create depth-of-field source post-process
|
|
519
|
-
this.textureAdderFinalPostProcess = new PostProcess("HDRDepthOfFieldSource", "standard", [], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define PASS_POST_PROCESS", 0);
|
|
520
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRBaseDepthOfFieldSource", () => {
|
|
521
|
-
return this.textureAdderFinalPostProcess;
|
|
522
|
-
}, true));
|
|
523
|
-
}
|
|
524
|
-
if (this._vlsEnabled) {
|
|
525
|
-
// Create volumetric light
|
|
526
|
-
this._createVolumetricLightPostProcess(scene, ratio);
|
|
527
|
-
// Create volumetric light final post-process
|
|
528
|
-
this.volumetricLightFinalPostProcess = new PostProcess("HDRVLSFinal", "standard", [], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define PASS_POST_PROCESS", 0);
|
|
529
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRVLSFinal", () => {
|
|
530
|
-
return this.volumetricLightFinalPostProcess;
|
|
531
|
-
}, true));
|
|
532
|
-
}
|
|
533
|
-
if (this._lensFlareEnabled) {
|
|
534
|
-
// Create lens flare post-process
|
|
535
|
-
this._createLensFlarePostProcess(scene, ratio);
|
|
536
|
-
// Create depth-of-field source post-process post lens-flare and disable it now
|
|
537
|
-
this.lensFlareFinalPostProcess = new PostProcess("HDRPostLensFlareDepthOfFieldSource", "standard", [], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define PASS_POST_PROCESS", 0);
|
|
538
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRPostLensFlareDepthOfFieldSource", () => {
|
|
539
|
-
return this.lensFlareFinalPostProcess;
|
|
540
|
-
}, true));
|
|
541
|
-
}
|
|
542
|
-
if (this._hdrEnabled) {
|
|
543
|
-
// Create luminance
|
|
544
|
-
this._createLuminancePostProcesses(scene, this._floatTextureType);
|
|
545
|
-
// Create HDR
|
|
546
|
-
this._createHdrPostProcess(scene, ratio);
|
|
547
|
-
// Create depth-of-field source post-process post hdr and disable it now
|
|
548
|
-
this.hdrFinalPostProcess = new PostProcess("HDRPostHDReDepthOfFieldSource", "standard", [], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define PASS_POST_PROCESS", 0);
|
|
549
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRPostHDReDepthOfFieldSource", () => {
|
|
550
|
-
return this.hdrFinalPostProcess;
|
|
551
|
-
}, true));
|
|
552
|
-
}
|
|
553
|
-
if (this._depthOfFieldEnabled) {
|
|
554
|
-
// Create gaussian blur used by depth-of-field
|
|
555
|
-
this._createBlurPostProcesses(scene, ratio / 2, 3, "depthOfFieldBlurWidth");
|
|
556
|
-
// Create depth-of-field post-process
|
|
557
|
-
this._createDepthOfFieldPostProcess(scene, ratio);
|
|
558
|
-
}
|
|
559
|
-
if (this._motionBlurEnabled) {
|
|
560
|
-
// Create motion blur post-process
|
|
561
|
-
this._createMotionBlurPostProcess(scene, ratio);
|
|
562
|
-
}
|
|
563
|
-
if (this._fxaaEnabled) {
|
|
564
|
-
// Create fxaa post-process
|
|
565
|
-
this.fxaaPostProcess = new FxaaPostProcess("fxaa", 1.0, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, 0);
|
|
566
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRFxaa", () => {
|
|
567
|
-
return this.fxaaPostProcess;
|
|
568
|
-
}, true));
|
|
569
|
-
}
|
|
570
|
-
if (this._cameras !== null) {
|
|
571
|
-
this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name, this._cameras);
|
|
572
|
-
}
|
|
573
|
-
if (!this._enableMSAAOnFirstPostProcess(this._samples) && this._samples > 1) {
|
|
574
|
-
Logger.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0");
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
// Down Sample X4 Post-Process
|
|
578
|
-
_createDownSampleX4PostProcess(scene, ratio) {
|
|
579
|
-
const downSampleX4Offsets = new Array(32);
|
|
580
|
-
this.downSampleX4PostProcess = new PostProcess("HDRDownSampleX4", "standard", ["dsOffsets"], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define DOWN_SAMPLE_X4", this._floatTextureType);
|
|
581
|
-
this.downSampleX4PostProcess.onApply = (effect) => {
|
|
582
|
-
let id = 0;
|
|
583
|
-
const width = this.downSampleX4PostProcess.width;
|
|
584
|
-
const height = this.downSampleX4PostProcess.height;
|
|
585
|
-
for (let i = -2; i < 2; i++) {
|
|
586
|
-
for (let j = -2; j < 2; j++) {
|
|
587
|
-
downSampleX4Offsets[id] = (i + 0.5) * (1.0 / width);
|
|
588
|
-
downSampleX4Offsets[id + 1] = (j + 0.5) * (1.0 / height);
|
|
589
|
-
id += 2;
|
|
141
|
+
/**
|
|
142
|
+
* Gets how much the image is blurred by the movement while using the motion blur post-process
|
|
143
|
+
*/
|
|
144
|
+
get motionStrength() {
|
|
145
|
+
return this._motionStrength;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Sets how much the image is blurred by the movement while using the motion blur post-process
|
|
149
|
+
*/
|
|
150
|
+
set motionStrength(strength) {
|
|
151
|
+
this._motionStrength = strength;
|
|
152
|
+
if (this._isObjectBasedMotionBlur && this.motionBlurPostProcess) {
|
|
153
|
+
this.motionBlurPostProcess.motionStrength = strength;
|
|
590
154
|
}
|
|
591
155
|
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
}, true));
|
|
598
|
-
}
|
|
599
|
-
// Brightpass Post-Process
|
|
600
|
-
_createBrightPassPostProcess(scene, ratio) {
|
|
601
|
-
const brightOffsets = new Array(8);
|
|
602
|
-
this.brightPassPostProcess = new PostProcess("HDRBrightPass", "standard", ["dsOffsets", "brightThreshold"], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define BRIGHT_PASS", this._floatTextureType);
|
|
603
|
-
this.brightPassPostProcess.onApply = (effect) => {
|
|
604
|
-
const sU = 1.0 / this.brightPassPostProcess.width;
|
|
605
|
-
const sV = 1.0 / this.brightPassPostProcess.height;
|
|
606
|
-
brightOffsets[0] = -0.5 * sU;
|
|
607
|
-
brightOffsets[1] = 0.5 * sV;
|
|
608
|
-
brightOffsets[2] = 0.5 * sU;
|
|
609
|
-
brightOffsets[3] = 0.5 * sV;
|
|
610
|
-
brightOffsets[4] = -0.5 * sU;
|
|
611
|
-
brightOffsets[5] = -0.5 * sV;
|
|
612
|
-
brightOffsets[6] = 0.5 * sU;
|
|
613
|
-
brightOffsets[7] = -0.5 * sV;
|
|
614
|
-
effect.setArray2("dsOffsets", brightOffsets);
|
|
615
|
-
effect.setFloat("brightThreshold", this.brightThreshold);
|
|
616
|
-
};
|
|
617
|
-
// Add to pipeline
|
|
618
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRBrightPass", () => {
|
|
619
|
-
return this.brightPassPostProcess;
|
|
620
|
-
}, true));
|
|
621
|
-
}
|
|
622
|
-
// Create blur H&V post-processes
|
|
623
|
-
_createBlurPostProcesses(scene, ratio, indice, blurWidthKey = "blurWidth") {
|
|
624
|
-
const engine = scene.getEngine();
|
|
625
|
-
const blurX = new BlurPostProcess("HDRBlurH" + "_" + indice, new Vector2(1, 0), this[blurWidthKey], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, this._floatTextureType);
|
|
626
|
-
const blurY = new BlurPostProcess("HDRBlurV" + "_" + indice, new Vector2(0, 1), this[blurWidthKey], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, this._floatTextureType);
|
|
627
|
-
blurX.onActivateObservable.add(() => {
|
|
628
|
-
const dw = blurX.width / engine.getRenderWidth();
|
|
629
|
-
blurX.kernel = this[blurWidthKey] * dw;
|
|
630
|
-
});
|
|
631
|
-
blurY.onActivateObservable.add(() => {
|
|
632
|
-
const dw = blurY.height / engine.getRenderHeight();
|
|
633
|
-
blurY.kernel = this.horizontalBlur ? 64 * dw : this[blurWidthKey] * dw;
|
|
634
|
-
});
|
|
635
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRBlurH" + indice, () => {
|
|
636
|
-
return blurX;
|
|
637
|
-
}, true));
|
|
638
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRBlurV" + indice, () => {
|
|
639
|
-
return blurY;
|
|
640
|
-
}, true));
|
|
641
|
-
this.blurHPostProcesses.push(blurX);
|
|
642
|
-
this.blurVPostProcesses.push(blurY);
|
|
643
|
-
}
|
|
644
|
-
// Create texture adder post-process
|
|
645
|
-
_createTextureAdderPostProcess(scene, ratio) {
|
|
646
|
-
this.textureAdderPostProcess = new PostProcess("HDRTextureAdder", "standard", ["exposure"], ["otherSampler", "lensSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define TEXTURE_ADDER", this._floatTextureType);
|
|
647
|
-
this.textureAdderPostProcess.onApply = (effect) => {
|
|
648
|
-
effect.setTextureFromPostProcess("otherSampler", this._vlsEnabled ? this._currentDepthOfFieldSource : this.originalPostProcess);
|
|
649
|
-
effect.setTexture("lensSampler", this.lensTexture);
|
|
650
|
-
effect.setFloat("exposure", this._currentExposure);
|
|
651
|
-
this._currentDepthOfFieldSource = this.textureAdderFinalPostProcess;
|
|
652
|
-
};
|
|
653
|
-
// Add to pipeline
|
|
654
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRTextureAdder", () => {
|
|
655
|
-
return this.textureAdderPostProcess;
|
|
656
|
-
}, true));
|
|
657
|
-
}
|
|
658
|
-
_createVolumetricLightPostProcess(scene, ratio) {
|
|
659
|
-
const geometryRenderer = scene.enableGeometryBufferRenderer();
|
|
660
|
-
geometryRenderer.enablePosition = true;
|
|
661
|
-
const geometry = geometryRenderer.getGBuffer();
|
|
662
|
-
// Base post-process
|
|
663
|
-
this.volumetricLightPostProcess = new PostProcess("HDRVLS", "standard", ["shadowViewProjection", "cameraPosition", "sunDirection", "sunColor", "scatteringCoefficient", "scatteringPower", "depthValues"], ["shadowMapSampler", "positionSampler"], ratio / 8, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define VLS\n#define NB_STEPS " + this._volumetricLightStepsCount.toFixed(1));
|
|
664
|
-
const depthValues = Vector2.Zero();
|
|
665
|
-
this.volumetricLightPostProcess.onApply = (effect) => {
|
|
666
|
-
if (this.sourceLight && this.sourceLight.getShadowGenerator() && this._scene.activeCamera) {
|
|
667
|
-
const generator = this.sourceLight.getShadowGenerator();
|
|
668
|
-
effect.setTexture("shadowMapSampler", generator.getShadowMap());
|
|
669
|
-
effect.setTexture("positionSampler", geometry.textures[2]);
|
|
670
|
-
effect.setColor3("sunColor", this.sourceLight.diffuse);
|
|
671
|
-
effect.setVector3("sunDirection", this.sourceLight.getShadowDirection());
|
|
672
|
-
effect.setVector3("cameraPosition", this._scene.activeCamera.globalPosition);
|
|
673
|
-
effect.setMatrix("shadowViewProjection", generator.getTransformMatrix());
|
|
674
|
-
effect.setFloat("scatteringCoefficient", this.volumetricLightCoefficient);
|
|
675
|
-
effect.setFloat("scatteringPower", this.volumetricLightPower);
|
|
676
|
-
depthValues.x = this.sourceLight.getDepthMinZ(this._scene.activeCamera);
|
|
677
|
-
depthValues.y = this.sourceLight.getDepthMaxZ(this._scene.activeCamera);
|
|
678
|
-
effect.setVector2("depthValues", depthValues);
|
|
156
|
+
/**
|
|
157
|
+
* Gets whether or not the motion blur post-process is object based or screen based.
|
|
158
|
+
*/
|
|
159
|
+
get objectBasedMotionBlur() {
|
|
160
|
+
return this._isObjectBasedMotionBlur;
|
|
679
161
|
}
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
// Create luminance
|
|
697
|
-
_createLuminancePostProcesses(scene, textureType) {
|
|
698
|
-
// Create luminance
|
|
699
|
-
let size = Math.pow(3, StandardRenderingPipeline.LuminanceSteps);
|
|
700
|
-
this.luminancePostProcess = new PostProcess("HDRLuminance", "standard", ["lumOffsets"], [], { width: size, height: size }, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define LUMINANCE", textureType);
|
|
701
|
-
const offsets = [];
|
|
702
|
-
this.luminancePostProcess.onApply = (effect) => {
|
|
703
|
-
const sU = 1.0 / this.luminancePostProcess.width;
|
|
704
|
-
const sV = 1.0 / this.luminancePostProcess.height;
|
|
705
|
-
offsets[0] = -0.5 * sU;
|
|
706
|
-
offsets[1] = 0.5 * sV;
|
|
707
|
-
offsets[2] = 0.5 * sU;
|
|
708
|
-
offsets[3] = 0.5 * sV;
|
|
709
|
-
offsets[4] = -0.5 * sU;
|
|
710
|
-
offsets[5] = -0.5 * sV;
|
|
711
|
-
offsets[6] = 0.5 * sU;
|
|
712
|
-
offsets[7] = -0.5 * sV;
|
|
713
|
-
effect.setArray2("lumOffsets", offsets);
|
|
714
|
-
};
|
|
715
|
-
// Add to pipeline
|
|
716
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRLuminance", () => {
|
|
717
|
-
return this.luminancePostProcess;
|
|
718
|
-
}, true));
|
|
719
|
-
// Create down sample luminance
|
|
720
|
-
for (let i = StandardRenderingPipeline.LuminanceSteps - 1; i >= 0; i--) {
|
|
721
|
-
size = Math.pow(3, i);
|
|
722
|
-
let defines = "#define LUMINANCE_DOWN_SAMPLE\n";
|
|
723
|
-
if (i === 0) {
|
|
724
|
-
defines += "#define FINAL_DOWN_SAMPLER";
|
|
162
|
+
/**
|
|
163
|
+
* Sets whether or not the motion blur post-process should be object based or screen based
|
|
164
|
+
*/
|
|
165
|
+
set objectBasedMotionBlur(value) {
|
|
166
|
+
const shouldRebuild = this._isObjectBasedMotionBlur !== value;
|
|
167
|
+
this._isObjectBasedMotionBlur = value;
|
|
168
|
+
if (shouldRebuild) {
|
|
169
|
+
this._buildPipeline();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* @ignore
|
|
174
|
+
* Specifies if the bloom pipeline is enabled
|
|
175
|
+
*/
|
|
176
|
+
get BloomEnabled() {
|
|
177
|
+
return this._bloomEnabled;
|
|
725
178
|
}
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
}
|
|
729
|
-
// Create callbacks and add effects
|
|
730
|
-
let lastLuminance = this.luminancePostProcess;
|
|
731
|
-
for (let index = 0; index < this.luminanceDownSamplePostProcesses.length; index++) {
|
|
732
|
-
const pp = this.luminanceDownSamplePostProcesses[index];
|
|
733
|
-
const downSampleOffsets = new Array(18);
|
|
734
|
-
pp.onApply = (effect) => {
|
|
735
|
-
if (!lastLuminance) {
|
|
179
|
+
set BloomEnabled(enabled) {
|
|
180
|
+
if (this._bloomEnabled === enabled) {
|
|
736
181
|
return;
|
|
737
182
|
}
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
183
|
+
this._bloomEnabled = enabled;
|
|
184
|
+
this._buildPipeline();
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* @ignore
|
|
188
|
+
* Specifies if the depth of field pipeline is enabled
|
|
189
|
+
*/
|
|
190
|
+
get DepthOfFieldEnabled() {
|
|
191
|
+
return this._depthOfFieldEnabled;
|
|
192
|
+
}
|
|
193
|
+
set DepthOfFieldEnabled(enabled) {
|
|
194
|
+
if (this._depthOfFieldEnabled === enabled) {
|
|
195
|
+
return;
|
|
745
196
|
}
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
197
|
+
this._depthOfFieldEnabled = enabled;
|
|
198
|
+
this._buildPipeline();
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @ignore
|
|
202
|
+
* Specifies if the lens flare pipeline is enabled
|
|
203
|
+
*/
|
|
204
|
+
get LensFlareEnabled() {
|
|
205
|
+
return this._lensFlareEnabled;
|
|
206
|
+
}
|
|
207
|
+
set LensFlareEnabled(enabled) {
|
|
208
|
+
if (this._lensFlareEnabled === enabled) {
|
|
209
|
+
return;
|
|
750
210
|
}
|
|
751
|
-
|
|
752
|
-
|
|
211
|
+
this._lensFlareEnabled = enabled;
|
|
212
|
+
this._buildPipeline();
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* @ignore
|
|
216
|
+
* Specifies if the HDR pipeline is enabled
|
|
217
|
+
*/
|
|
218
|
+
get HDREnabled() {
|
|
219
|
+
return this._hdrEnabled;
|
|
220
|
+
}
|
|
221
|
+
set HDREnabled(enabled) {
|
|
222
|
+
if (this._hdrEnabled === enabled) {
|
|
223
|
+
return;
|
|
753
224
|
}
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
pp.onAfterRender = () => {
|
|
757
|
-
const pixel = scene.getEngine().readPixels(0, 0, 1, 1);
|
|
758
|
-
const bit_shift = new Vector4(1.0 / (255.0 * 255.0 * 255.0), 1.0 / (255.0 * 255.0), 1.0 / 255.0, 1.0);
|
|
759
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then
|
|
760
|
-
pixel.then((pixel) => {
|
|
761
|
-
const data = new Uint8Array(pixel.buffer);
|
|
762
|
-
this._hdrCurrentLuminance = (data[0] * bit_shift.x + data[1] * bit_shift.y + data[2] * bit_shift.z + data[3] * bit_shift.w) / 100.0;
|
|
763
|
-
});
|
|
764
|
-
};
|
|
225
|
+
this._hdrEnabled = enabled;
|
|
226
|
+
this._buildPipeline();
|
|
765
227
|
}
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
_createHdrPostProcess(scene, ratio) {
|
|
773
|
-
const defines = ["#define HDR"];
|
|
774
|
-
if (this._hdrAutoExposure) {
|
|
775
|
-
defines.push("#define AUTO_EXPOSURE");
|
|
776
|
-
}
|
|
777
|
-
this.hdrPostProcess = new PostProcess("HDR", "standard", ["averageLuminance"], ["textureAdderSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, defines.join("\n"), 0);
|
|
778
|
-
let outputLiminance = 1;
|
|
779
|
-
let time = 0;
|
|
780
|
-
let lastTime = 0;
|
|
781
|
-
this.hdrPostProcess.onApply = (effect) => {
|
|
782
|
-
effect.setTextureFromPostProcess("textureAdderSampler", this._currentDepthOfFieldSource);
|
|
783
|
-
time += scene.getEngine().getDeltaTime();
|
|
784
|
-
if (outputLiminance < 0) {
|
|
785
|
-
outputLiminance = this._hdrCurrentLuminance;
|
|
228
|
+
/**
|
|
229
|
+
* @ignore
|
|
230
|
+
* Specifies if the volumetric lights scattering effect is enabled
|
|
231
|
+
*/
|
|
232
|
+
get VLSEnabled() {
|
|
233
|
+
return this._vlsEnabled;
|
|
786
234
|
}
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
outputLiminance += this.hdrDecreaseRate * dt;
|
|
235
|
+
set VLSEnabled(enabled) {
|
|
236
|
+
if (this._vlsEnabled === enabled) {
|
|
237
|
+
return;
|
|
791
238
|
}
|
|
792
|
-
|
|
793
|
-
|
|
239
|
+
if (enabled) {
|
|
240
|
+
const geometry = this._scene.enableGeometryBufferRenderer();
|
|
241
|
+
if (!geometry) {
|
|
242
|
+
Logger.Warn("Geometry renderer is not supported, cannot create volumetric lights in Standard Rendering Pipeline");
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
794
245
|
}
|
|
795
|
-
|
|
796
|
-
|
|
246
|
+
this._vlsEnabled = enabled;
|
|
247
|
+
this._buildPipeline();
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* @ignore
|
|
251
|
+
* Specifies if the motion blur effect is enabled
|
|
252
|
+
*/
|
|
253
|
+
get MotionBlurEnabled() {
|
|
254
|
+
return this._motionBlurEnabled;
|
|
255
|
+
}
|
|
256
|
+
set MotionBlurEnabled(enabled) {
|
|
257
|
+
if (this._motionBlurEnabled === enabled) {
|
|
258
|
+
return;
|
|
797
259
|
}
|
|
260
|
+
this._motionBlurEnabled = enabled;
|
|
261
|
+
this._buildPipeline();
|
|
798
262
|
}
|
|
799
|
-
|
|
800
|
-
|
|
263
|
+
/**
|
|
264
|
+
* Specifies if anti-aliasing is enabled
|
|
265
|
+
*/
|
|
266
|
+
get fxaaEnabled() {
|
|
267
|
+
return this._fxaaEnabled;
|
|
801
268
|
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
269
|
+
set fxaaEnabled(enabled) {
|
|
270
|
+
if (this._fxaaEnabled === enabled) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
this._fxaaEnabled = enabled;
|
|
274
|
+
this._buildPipeline();
|
|
805
275
|
}
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
}, true));
|
|
812
|
-
}
|
|
813
|
-
// Create lens flare post-process
|
|
814
|
-
_createLensFlarePostProcess(scene, ratio) {
|
|
815
|
-
this.lensFlarePostProcess = new PostProcess("HDRLensFlare", "standard", ["strength", "ghostDispersal", "haloWidth", "resolution", "distortionStrength"], ["lensColorSampler"], ratio / 2, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define LENS_FLARE", 0);
|
|
816
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRLensFlare", () => {
|
|
817
|
-
return this.lensFlarePostProcess;
|
|
818
|
-
}, true));
|
|
819
|
-
this._createBlurPostProcesses(scene, ratio / 4, 2, "lensFlareBlurWidth");
|
|
820
|
-
this.lensFlareComposePostProcess = new PostProcess("HDRLensFlareCompose", "standard", ["lensStarMatrix"], ["otherSampler", "lensDirtSampler", "lensStarSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define LENS_FLARE_COMPOSE", 0);
|
|
821
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRLensFlareCompose", () => {
|
|
822
|
-
return this.lensFlareComposePostProcess;
|
|
823
|
-
}, true));
|
|
824
|
-
const resolution = new Vector2(0, 0);
|
|
825
|
-
// Lens flare
|
|
826
|
-
this.lensFlarePostProcess.externalTextureSamplerBinding = true;
|
|
827
|
-
this.lensFlarePostProcess.onApply = (effect) => {
|
|
828
|
-
effect.setTextureFromPostProcess("textureSampler", this._bloomEnabled ? this.blurHPostProcesses[0] : this.originalPostProcess);
|
|
829
|
-
effect.setTexture("lensColorSampler", this.lensColorTexture);
|
|
830
|
-
effect.setFloat("strength", this.lensFlareStrength);
|
|
831
|
-
effect.setFloat("ghostDispersal", this.lensFlareGhostDispersal);
|
|
832
|
-
effect.setFloat("haloWidth", this.lensFlareHaloWidth);
|
|
833
|
-
// Shift
|
|
834
|
-
resolution.x = this.lensFlarePostProcess.width;
|
|
835
|
-
resolution.y = this.lensFlarePostProcess.height;
|
|
836
|
-
effect.setVector2("resolution", resolution);
|
|
837
|
-
effect.setFloat("distortionStrength", this.lensFlareDistortionStrength);
|
|
838
|
-
};
|
|
839
|
-
// Compose
|
|
840
|
-
const scaleBias1 = Matrix.FromValues(2.0, 0.0, -1.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
|
|
841
|
-
const scaleBias2 = Matrix.FromValues(0.5, 0.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
|
|
842
|
-
this.lensFlareComposePostProcess.onApply = (effect) => {
|
|
843
|
-
if (!this._scene.activeCamera) {
|
|
844
|
-
return;
|
|
276
|
+
/**
|
|
277
|
+
* Specifies if screen space reflections are enabled.
|
|
278
|
+
*/
|
|
279
|
+
get screenSpaceReflectionsEnabled() {
|
|
280
|
+
return this._screenSpaceReflectionsEnabled;
|
|
845
281
|
}
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
let camRot = Vector3.Dot(camerax.toVector3(), new Vector3(1.0, 0.0, 0.0)) + Vector3.Dot(cameraz.toVector3(), new Vector3(0.0, 0.0, 1.0));
|
|
853
|
-
camRot *= 4.0;
|
|
854
|
-
const starRotation = Matrix.FromValues(Math.cos(camRot) * 0.5, -Math.sin(camRot), 0.0, 0.0, Math.sin(camRot), Math.cos(camRot) * 0.5, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
|
|
855
|
-
const lensStarMatrix = scaleBias2.multiply(starRotation).multiply(scaleBias1);
|
|
856
|
-
effect.setMatrix("lensStarMatrix", lensStarMatrix);
|
|
857
|
-
this._currentDepthOfFieldSource = this.lensFlareFinalPostProcess;
|
|
858
|
-
};
|
|
859
|
-
}
|
|
860
|
-
// Create depth-of-field post-process
|
|
861
|
-
_createDepthOfFieldPostProcess(scene, ratio) {
|
|
862
|
-
this.depthOfFieldPostProcess = new PostProcess("HDRDepthOfField", "standard", ["distance"], ["otherSampler", "depthSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define DEPTH_OF_FIELD", 0);
|
|
863
|
-
this.depthOfFieldPostProcess.onApply = (effect) => {
|
|
864
|
-
effect.setTextureFromPostProcess("otherSampler", this._currentDepthOfFieldSource);
|
|
865
|
-
effect.setTexture("depthSampler", this._getDepthTexture());
|
|
866
|
-
effect.setFloat("distance", this.depthOfFieldDistance);
|
|
867
|
-
};
|
|
868
|
-
// Add to pipeline
|
|
869
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRDepthOfField", () => {
|
|
870
|
-
return this.depthOfFieldPostProcess;
|
|
871
|
-
}, true));
|
|
872
|
-
}
|
|
873
|
-
// Create motion blur post-process
|
|
874
|
-
_createMotionBlurPostProcess(scene, ratio) {
|
|
875
|
-
if (this._isObjectBasedMotionBlur) {
|
|
876
|
-
const mb = new MotionBlurPostProcess("HDRMotionBlur", scene, ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, 0);
|
|
877
|
-
mb.motionStrength = this.motionStrength;
|
|
878
|
-
mb.motionBlurSamples = this.motionBlurSamples;
|
|
879
|
-
this.motionBlurPostProcess = mb;
|
|
880
|
-
}
|
|
881
|
-
else {
|
|
882
|
-
this.motionBlurPostProcess = new PostProcess("HDRMotionBlur", "standard", ["inverseViewProjection", "prevViewProjection", "screenSize", "motionScale", "motionStrength"], ["depthSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define MOTION_BLUR\n#define MAX_MOTION_SAMPLES " + this.motionBlurSamples.toFixed(1), 0);
|
|
883
|
-
let motionScale = 0;
|
|
884
|
-
let prevViewProjection = Matrix.Identity();
|
|
885
|
-
const invViewProjection = Matrix.Identity();
|
|
886
|
-
let viewProjection = Matrix.Identity();
|
|
887
|
-
const screenSize = Vector2.Zero();
|
|
888
|
-
this.motionBlurPostProcess.onApply = (effect) => {
|
|
889
|
-
viewProjection = scene.getProjectionMatrix().multiply(scene.getViewMatrix());
|
|
890
|
-
viewProjection.invertToRef(invViewProjection);
|
|
891
|
-
effect.setMatrix("inverseViewProjection", invViewProjection);
|
|
892
|
-
effect.setMatrix("prevViewProjection", prevViewProjection);
|
|
893
|
-
prevViewProjection = viewProjection;
|
|
894
|
-
screenSize.x = this.motionBlurPostProcess.width;
|
|
895
|
-
screenSize.y = this.motionBlurPostProcess.height;
|
|
896
|
-
effect.setVector2("screenSize", screenSize);
|
|
897
|
-
motionScale = scene.getEngine().getFps() / 60.0;
|
|
898
|
-
effect.setFloat("motionScale", motionScale);
|
|
899
|
-
effect.setFloat("motionStrength", this.motionStrength);
|
|
900
|
-
effect.setTexture("depthSampler", this._getDepthTexture());
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRMotionBlur", () => {
|
|
904
|
-
return this.motionBlurPostProcess;
|
|
905
|
-
}, true));
|
|
906
|
-
}
|
|
907
|
-
_getDepthTexture() {
|
|
908
|
-
if (this._scene.getEngine().getCaps().drawBuffersExtension) {
|
|
909
|
-
const renderer = this._scene.enableGeometryBufferRenderer();
|
|
910
|
-
return renderer.getGBuffer().textures[0];
|
|
911
|
-
}
|
|
912
|
-
return this._scene.enableDepthRenderer().getDepthMap();
|
|
913
|
-
}
|
|
914
|
-
_disposePostProcesses() {
|
|
915
|
-
for (let i = 0; i < this._cameras.length; i++) {
|
|
916
|
-
const camera = this._cameras[i];
|
|
917
|
-
if (this.originalPostProcess) {
|
|
918
|
-
this.originalPostProcess.dispose(camera);
|
|
282
|
+
set screenSpaceReflectionsEnabled(enabled) {
|
|
283
|
+
if (this._screenSpaceReflectionsEnabled === enabled) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
this._screenSpaceReflectionsEnabled = enabled;
|
|
287
|
+
this._buildPipeline();
|
|
919
288
|
}
|
|
920
|
-
|
|
921
|
-
|
|
289
|
+
/**
|
|
290
|
+
* Specifies the number of steps used to calculate the volumetric lights
|
|
291
|
+
* Typically in interval [50, 200]
|
|
292
|
+
*/
|
|
293
|
+
get volumetricLightStepsCount() {
|
|
294
|
+
return this._volumetricLightStepsCount;
|
|
922
295
|
}
|
|
923
|
-
|
|
924
|
-
this.
|
|
296
|
+
set volumetricLightStepsCount(count) {
|
|
297
|
+
if (this.volumetricLightPostProcess) {
|
|
298
|
+
this.volumetricLightPostProcess.updateEffect("#define VLS\n#define NB_STEPS " + count.toFixed(1));
|
|
299
|
+
}
|
|
300
|
+
this._volumetricLightStepsCount = count;
|
|
925
301
|
}
|
|
926
|
-
|
|
927
|
-
|
|
302
|
+
/**
|
|
303
|
+
* Specifies the number of samples used for the motion blur effect
|
|
304
|
+
* Typically in interval [16, 64]
|
|
305
|
+
*/
|
|
306
|
+
get motionBlurSamples() {
|
|
307
|
+
return this._motionBlurSamples;
|
|
928
308
|
}
|
|
929
|
-
|
|
930
|
-
this.
|
|
309
|
+
set motionBlurSamples(samples) {
|
|
310
|
+
if (this.motionBlurPostProcess) {
|
|
311
|
+
if (this._isObjectBasedMotionBlur) {
|
|
312
|
+
this.motionBlurPostProcess.motionBlurSamples = samples;
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
this.motionBlurPostProcess.updateEffect("#define MOTION_BLUR\n#define MAX_MOTION_SAMPLES " + samples.toFixed(1));
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
this._motionBlurSamples = samples;
|
|
931
319
|
}
|
|
932
|
-
|
|
933
|
-
|
|
320
|
+
/**
|
|
321
|
+
* Specifies MSAA sample count, setting this to 4 will provide 4x anti aliasing. (default: 1)
|
|
322
|
+
*/
|
|
323
|
+
get samples() {
|
|
324
|
+
return this._samples;
|
|
934
325
|
}
|
|
935
|
-
|
|
936
|
-
this.
|
|
326
|
+
set samples(sampleCount) {
|
|
327
|
+
if (this._samples === sampleCount) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
this._samples = sampleCount;
|
|
331
|
+
this._buildPipeline();
|
|
937
332
|
}
|
|
938
|
-
|
|
939
|
-
|
|
333
|
+
/**
|
|
334
|
+
* Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
|
|
335
|
+
* @constructor
|
|
336
|
+
* @param name The rendering pipeline name
|
|
337
|
+
* @param scene The scene linked to this pipeline
|
|
338
|
+
* @param ratio The size of the postprocesses (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)
|
|
339
|
+
* @param originalPostProcess the custom original color post-process. Must be "reusable". Can be null.
|
|
340
|
+
* @param cameras The array of cameras that the rendering pipeline will be attached to
|
|
341
|
+
*/
|
|
342
|
+
constructor(name, scene, ratio, originalPostProcess = null, cameras) {
|
|
343
|
+
RegisterDepthRendererSceneComponent(DepthRenderer);
|
|
344
|
+
super(scene.getEngine(), name);
|
|
345
|
+
/**
|
|
346
|
+
* Public members
|
|
347
|
+
*/
|
|
348
|
+
// Post-processes
|
|
349
|
+
/**
|
|
350
|
+
* Post-process which contains the original scene color before the pipeline applies all the effects
|
|
351
|
+
*/
|
|
352
|
+
this.originalPostProcess = __runInitializers(this, _instanceExtraInitializers);
|
|
353
|
+
/**
|
|
354
|
+
* Post-process used to down scale an image x4
|
|
355
|
+
*/
|
|
356
|
+
this.downSampleX4PostProcess = null;
|
|
357
|
+
/**
|
|
358
|
+
* Post-process used to calculate the illuminated surfaces controlled by a threshold
|
|
359
|
+
*/
|
|
360
|
+
this.brightPassPostProcess = null;
|
|
361
|
+
/**
|
|
362
|
+
* Post-process array storing all the horizontal blur post-processes used by the pipeline
|
|
363
|
+
*/
|
|
364
|
+
this.blurHPostProcesses = [];
|
|
365
|
+
/**
|
|
366
|
+
* Post-process array storing all the vertical blur post-processes used by the pipeline
|
|
367
|
+
*/
|
|
368
|
+
this.blurVPostProcesses = [];
|
|
369
|
+
/**
|
|
370
|
+
* Post-process used to add colors of 2 textures (typically brightness + real scene color)
|
|
371
|
+
*/
|
|
372
|
+
this.textureAdderPostProcess = null;
|
|
373
|
+
/**
|
|
374
|
+
* Post-process used to create volumetric lighting effect
|
|
375
|
+
*/
|
|
376
|
+
this.volumetricLightPostProcess = null;
|
|
377
|
+
/**
|
|
378
|
+
* Post-process used to smooth the previous volumetric light post-process on the X axis
|
|
379
|
+
*/
|
|
380
|
+
this.volumetricLightSmoothXPostProcess = null;
|
|
381
|
+
/**
|
|
382
|
+
* Post-process used to smooth the previous volumetric light post-process on the Y axis
|
|
383
|
+
*/
|
|
384
|
+
this.volumetricLightSmoothYPostProcess = null;
|
|
385
|
+
/**
|
|
386
|
+
* Post-process used to merge the volumetric light effect and the real scene color
|
|
387
|
+
*/
|
|
388
|
+
this.volumetricLightMergePostProces = null;
|
|
389
|
+
/**
|
|
390
|
+
* Post-process used to store the final volumetric light post-process (attach/detach for debug purpose)
|
|
391
|
+
*/
|
|
392
|
+
this.volumetricLightFinalPostProcess = null;
|
|
393
|
+
/**
|
|
394
|
+
* Base post-process used to calculate the average luminance of the final image for HDR
|
|
395
|
+
*/
|
|
396
|
+
this.luminancePostProcess = null;
|
|
397
|
+
/**
|
|
398
|
+
* Post-processes used to create down sample post-processes in order to get
|
|
399
|
+
* the average luminance of the final image for HDR
|
|
400
|
+
* Array of length "StandardRenderingPipeline.LuminanceSteps"
|
|
401
|
+
*/
|
|
402
|
+
this.luminanceDownSamplePostProcesses = [];
|
|
403
|
+
/**
|
|
404
|
+
* Post-process used to create a HDR effect (light adaptation)
|
|
405
|
+
*/
|
|
406
|
+
this.hdrPostProcess = null;
|
|
407
|
+
/**
|
|
408
|
+
* Post-process used to store the final texture adder post-process (attach/detach for debug purpose)
|
|
409
|
+
*/
|
|
410
|
+
this.textureAdderFinalPostProcess = null;
|
|
411
|
+
/**
|
|
412
|
+
* Post-process used to store the final lens flare post-process (attach/detach for debug purpose)
|
|
413
|
+
*/
|
|
414
|
+
this.lensFlareFinalPostProcess = null;
|
|
415
|
+
/**
|
|
416
|
+
* Post-process used to merge the final HDR post-process and the real scene color
|
|
417
|
+
*/
|
|
418
|
+
this.hdrFinalPostProcess = null;
|
|
419
|
+
/**
|
|
420
|
+
* Post-process used to create a lens flare effect
|
|
421
|
+
*/
|
|
422
|
+
this.lensFlarePostProcess = null;
|
|
423
|
+
/**
|
|
424
|
+
* Post-process that merges the result of the lens flare post-process and the real scene color
|
|
425
|
+
*/
|
|
426
|
+
this.lensFlareComposePostProcess = null;
|
|
427
|
+
/**
|
|
428
|
+
* Post-process used to create a motion blur effect
|
|
429
|
+
*/
|
|
430
|
+
this.motionBlurPostProcess = null;
|
|
431
|
+
/**
|
|
432
|
+
* Post-process used to create a depth of field effect
|
|
433
|
+
*/
|
|
434
|
+
this.depthOfFieldPostProcess = null;
|
|
435
|
+
/**
|
|
436
|
+
* The Fast Approximate Anti-Aliasing post process which attempts to remove aliasing from an image.
|
|
437
|
+
*/
|
|
438
|
+
this.fxaaPostProcess = null;
|
|
439
|
+
/**
|
|
440
|
+
* Post-process used to simulate realtime reflections using the screen space and geometry renderer.
|
|
441
|
+
*/
|
|
442
|
+
this.screenSpaceReflectionPostProcess = null;
|
|
443
|
+
// Values
|
|
444
|
+
/**
|
|
445
|
+
* Represents the brightness threshold in order to configure the illuminated surfaces
|
|
446
|
+
*/
|
|
447
|
+
this.brightThreshold = __runInitializers(this, _brightThreshold_initializers, 1.0);
|
|
448
|
+
/**
|
|
449
|
+
* Configures the blur intensity used for surexposed surfaces are highlighted surfaces (light halo)
|
|
450
|
+
*/
|
|
451
|
+
this.blurWidth = (__runInitializers(this, _brightThreshold_extraInitializers), __runInitializers(this, _blurWidth_initializers, 512.0));
|
|
452
|
+
/**
|
|
453
|
+
* Sets if the blur for highlighted surfaces must be only horizontal
|
|
454
|
+
*/
|
|
455
|
+
this.horizontalBlur = (__runInitializers(this, _blurWidth_extraInitializers), __runInitializers(this, _horizontalBlur_initializers, false));
|
|
456
|
+
/**
|
|
457
|
+
* Texture used typically to simulate "dirty" on camera lens
|
|
458
|
+
*/
|
|
459
|
+
this.lensTexture = (__runInitializers(this, _horizontalBlur_extraInitializers), __runInitializers(this, _lensTexture_initializers, null));
|
|
460
|
+
/**
|
|
461
|
+
* Represents the offset coefficient based on Rayleigh principle. Typically in interval [-0.2, 0.2]
|
|
462
|
+
*/
|
|
463
|
+
this.volumetricLightCoefficient = (__runInitializers(this, _lensTexture_extraInitializers), __runInitializers(this, _volumetricLightCoefficient_initializers, 0.2));
|
|
464
|
+
/**
|
|
465
|
+
* The overall power of volumetric lights, typically in interval [0, 10] maximum
|
|
466
|
+
*/
|
|
467
|
+
this.volumetricLightPower = (__runInitializers(this, _volumetricLightCoefficient_extraInitializers), __runInitializers(this, _volumetricLightPower_initializers, 4.0));
|
|
468
|
+
/**
|
|
469
|
+
* Used the set the blur intensity to smooth the volumetric lights
|
|
470
|
+
*/
|
|
471
|
+
this.volumetricLightBlurScale = (__runInitializers(this, _volumetricLightPower_extraInitializers), __runInitializers(this, _volumetricLightBlurScale_initializers, 64.0));
|
|
472
|
+
/**
|
|
473
|
+
* Light (spot or directional) used to generate the volumetric lights rays
|
|
474
|
+
* The source light must have a shadow generate so the pipeline can get its
|
|
475
|
+
* depth map
|
|
476
|
+
*/
|
|
477
|
+
this.sourceLight = (__runInitializers(this, _volumetricLightBlurScale_extraInitializers), null);
|
|
478
|
+
/**
|
|
479
|
+
* For eye adaptation, represents the minimum luminance the eye can see
|
|
480
|
+
*/
|
|
481
|
+
this.hdrMinimumLuminance = __runInitializers(this, _hdrMinimumLuminance_initializers, 1.0);
|
|
482
|
+
/**
|
|
483
|
+
* For eye adaptation, represents the decrease luminance speed
|
|
484
|
+
*/
|
|
485
|
+
this.hdrDecreaseRate = (__runInitializers(this, _hdrMinimumLuminance_extraInitializers), __runInitializers(this, _hdrDecreaseRate_initializers, 0.5));
|
|
486
|
+
/**
|
|
487
|
+
* For eye adaptation, represents the increase luminance speed
|
|
488
|
+
*/
|
|
489
|
+
this.hdrIncreaseRate = (__runInitializers(this, _hdrDecreaseRate_extraInitializers), __runInitializers(this, _hdrIncreaseRate_initializers, 0.5));
|
|
490
|
+
/**
|
|
491
|
+
* Lens color texture used by the lens flare effect. Mandatory if lens flare effect enabled
|
|
492
|
+
*/
|
|
493
|
+
this.lensColorTexture = (__runInitializers(this, _hdrIncreaseRate_extraInitializers), __runInitializers(this, _lensColorTexture_initializers, null));
|
|
494
|
+
/**
|
|
495
|
+
* The overall strength for the lens flare effect
|
|
496
|
+
*/
|
|
497
|
+
this.lensFlareStrength = (__runInitializers(this, _lensColorTexture_extraInitializers), __runInitializers(this, _lensFlareStrength_initializers, 20.0));
|
|
498
|
+
/**
|
|
499
|
+
* Dispersion coefficient for lens flare ghosts
|
|
500
|
+
*/
|
|
501
|
+
this.lensFlareGhostDispersal = (__runInitializers(this, _lensFlareStrength_extraInitializers), __runInitializers(this, _lensFlareGhostDispersal_initializers, 1.4));
|
|
502
|
+
/**
|
|
503
|
+
* Main lens flare halo width
|
|
504
|
+
*/
|
|
505
|
+
this.lensFlareHaloWidth = (__runInitializers(this, _lensFlareGhostDispersal_extraInitializers), __runInitializers(this, _lensFlareHaloWidth_initializers, 0.7));
|
|
506
|
+
/**
|
|
507
|
+
* Based on the lens distortion effect, defines how much the lens flare result
|
|
508
|
+
* is distorted
|
|
509
|
+
*/
|
|
510
|
+
this.lensFlareDistortionStrength = (__runInitializers(this, _lensFlareHaloWidth_extraInitializers), __runInitializers(this, _lensFlareDistortionStrength_initializers, 16.0));
|
|
511
|
+
/**
|
|
512
|
+
* Configures the blur intensity used for for lens flare (halo)
|
|
513
|
+
*/
|
|
514
|
+
this.lensFlareBlurWidth = (__runInitializers(this, _lensFlareDistortionStrength_extraInitializers), __runInitializers(this, _lensFlareBlurWidth_initializers, 512.0));
|
|
515
|
+
/**
|
|
516
|
+
* Lens star texture must be used to simulate rays on the flares and is available
|
|
517
|
+
* in the documentation
|
|
518
|
+
*/
|
|
519
|
+
this.lensStarTexture = (__runInitializers(this, _lensFlareBlurWidth_extraInitializers), __runInitializers(this, _lensStarTexture_initializers, null));
|
|
520
|
+
/**
|
|
521
|
+
* As the "lensTexture" (can be the same texture or different), it is used to apply the lens
|
|
522
|
+
* flare effect by taking account of the dirt texture
|
|
523
|
+
*/
|
|
524
|
+
this.lensFlareDirtTexture = (__runInitializers(this, _lensStarTexture_extraInitializers), __runInitializers(this, _lensFlareDirtTexture_initializers, null));
|
|
525
|
+
/**
|
|
526
|
+
* Represents the focal length for the depth of field effect
|
|
527
|
+
*/
|
|
528
|
+
this.depthOfFieldDistance = (__runInitializers(this, _lensFlareDirtTexture_extraInitializers), __runInitializers(this, _depthOfFieldDistance_initializers, 10.0));
|
|
529
|
+
/**
|
|
530
|
+
* Represents the blur intensity for the blurred part of the depth of field effect
|
|
531
|
+
*/
|
|
532
|
+
this.depthOfFieldBlurWidth = (__runInitializers(this, _depthOfFieldDistance_extraInitializers), __runInitializers(this, _depthOfFieldBlurWidth_initializers, 64.0));
|
|
533
|
+
/**
|
|
534
|
+
* List of animations for the pipeline (IAnimatable implementation)
|
|
535
|
+
*/
|
|
536
|
+
this.animations = (__runInitializers(this, _depthOfFieldBlurWidth_extraInitializers), []);
|
|
537
|
+
this._currentDepthOfFieldSource = null;
|
|
538
|
+
this._fixedExposure = 1.0;
|
|
539
|
+
this._currentExposure = 1.0;
|
|
540
|
+
this._hdrAutoExposure = false;
|
|
541
|
+
this._hdrCurrentLuminance = 1.0;
|
|
542
|
+
this._motionStrength = 1.0;
|
|
543
|
+
this._isObjectBasedMotionBlur = false;
|
|
544
|
+
this._camerasToBeAttached = [];
|
|
545
|
+
this._ratio = __runInitializers(this, __ratio_initializers, void 0);
|
|
546
|
+
// Getters and setters
|
|
547
|
+
this._bloomEnabled = (__runInitializers(this, __ratio_extraInitializers), false);
|
|
548
|
+
this._depthOfFieldEnabled = false;
|
|
549
|
+
this._vlsEnabled = false;
|
|
550
|
+
this._lensFlareEnabled = false;
|
|
551
|
+
this._hdrEnabled = false;
|
|
552
|
+
this._motionBlurEnabled = false;
|
|
553
|
+
this._fxaaEnabled = false;
|
|
554
|
+
this._screenSpaceReflectionsEnabled = false;
|
|
555
|
+
this._motionBlurSamples = 64.0;
|
|
556
|
+
this._volumetricLightStepsCount = 50.0;
|
|
557
|
+
this._samples = 1;
|
|
558
|
+
this._cameras = cameras || scene.cameras;
|
|
559
|
+
this._cameras = this._cameras.slice();
|
|
560
|
+
this._camerasToBeAttached = this._cameras.slice();
|
|
561
|
+
// Initialize
|
|
562
|
+
this._scene = scene;
|
|
563
|
+
this._basePostProcess = originalPostProcess;
|
|
564
|
+
this._ratio = ratio;
|
|
565
|
+
// Misc
|
|
566
|
+
this._floatTextureType = scene.getEngine().getCaps().textureFloatRender ? 1 : 2;
|
|
567
|
+
// Finish
|
|
568
|
+
scene.postProcessRenderPipelineManager.addPipeline(this);
|
|
569
|
+
this._buildPipeline();
|
|
940
570
|
}
|
|
941
|
-
|
|
942
|
-
this.
|
|
571
|
+
_buildPipeline() {
|
|
572
|
+
const ratio = this._ratio;
|
|
573
|
+
const scene = this._scene;
|
|
574
|
+
this._disposePostProcesses();
|
|
575
|
+
if (this._cameras !== null) {
|
|
576
|
+
this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
|
|
577
|
+
// get back cameras to be used to reattach pipeline
|
|
578
|
+
this._cameras = this._camerasToBeAttached.slice();
|
|
579
|
+
}
|
|
580
|
+
this._reset();
|
|
581
|
+
// Create pass post-process
|
|
582
|
+
if (this._screenSpaceReflectionsEnabled) {
|
|
583
|
+
this.screenSpaceReflectionPostProcess = new ScreenSpaceReflectionPostProcess("HDRPass", scene, ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, this._floatTextureType);
|
|
584
|
+
this.screenSpaceReflectionPostProcess.onApplyObservable.add(() => {
|
|
585
|
+
this._currentDepthOfFieldSource = this.screenSpaceReflectionPostProcess;
|
|
586
|
+
});
|
|
587
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRScreenSpaceReflections", () => this.screenSpaceReflectionPostProcess, true));
|
|
588
|
+
}
|
|
589
|
+
if (!this._basePostProcess) {
|
|
590
|
+
this.originalPostProcess = new PostProcess("HDRPass", "standard", [], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define PASS_POST_PROCESS", this._floatTextureType);
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
this.originalPostProcess = this._basePostProcess;
|
|
594
|
+
}
|
|
595
|
+
this.originalPostProcess.autoClear = !this.screenSpaceReflectionPostProcess;
|
|
596
|
+
this.originalPostProcess.onApplyObservable.add(() => {
|
|
597
|
+
this._currentDepthOfFieldSource = this.originalPostProcess;
|
|
598
|
+
});
|
|
599
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRPassPostProcess", () => this.originalPostProcess, true));
|
|
600
|
+
if (this._bloomEnabled) {
|
|
601
|
+
// Create down sample X4 post-process
|
|
602
|
+
this._createDownSampleX4PostProcess(scene, ratio / 4);
|
|
603
|
+
// Create bright pass post-process
|
|
604
|
+
this._createBrightPassPostProcess(scene, ratio / 4);
|
|
605
|
+
// Create gaussian blur post-processes (down sampling blurs)
|
|
606
|
+
this._createBlurPostProcesses(scene, ratio / 4, 1);
|
|
607
|
+
// Create texture adder post-process
|
|
608
|
+
this._createTextureAdderPostProcess(scene, ratio);
|
|
609
|
+
// Create depth-of-field source post-process
|
|
610
|
+
this.textureAdderFinalPostProcess = new PostProcess("HDRDepthOfFieldSource", "standard", [], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define PASS_POST_PROCESS", 0);
|
|
611
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRBaseDepthOfFieldSource", () => {
|
|
612
|
+
return this.textureAdderFinalPostProcess;
|
|
613
|
+
}, true));
|
|
614
|
+
}
|
|
615
|
+
if (this._vlsEnabled) {
|
|
616
|
+
// Create volumetric light
|
|
617
|
+
this._createVolumetricLightPostProcess(scene, ratio);
|
|
618
|
+
// Create volumetric light final post-process
|
|
619
|
+
this.volumetricLightFinalPostProcess = new PostProcess("HDRVLSFinal", "standard", [], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define PASS_POST_PROCESS", 0);
|
|
620
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRVLSFinal", () => {
|
|
621
|
+
return this.volumetricLightFinalPostProcess;
|
|
622
|
+
}, true));
|
|
623
|
+
}
|
|
624
|
+
if (this._lensFlareEnabled) {
|
|
625
|
+
// Create lens flare post-process
|
|
626
|
+
this._createLensFlarePostProcess(scene, ratio);
|
|
627
|
+
// Create depth-of-field source post-process post lens-flare and disable it now
|
|
628
|
+
this.lensFlareFinalPostProcess = new PostProcess("HDRPostLensFlareDepthOfFieldSource", "standard", [], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define PASS_POST_PROCESS", 0);
|
|
629
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRPostLensFlareDepthOfFieldSource", () => {
|
|
630
|
+
return this.lensFlareFinalPostProcess;
|
|
631
|
+
}, true));
|
|
632
|
+
}
|
|
633
|
+
if (this._hdrEnabled) {
|
|
634
|
+
// Create luminance
|
|
635
|
+
this._createLuminancePostProcesses(scene, this._floatTextureType);
|
|
636
|
+
// Create HDR
|
|
637
|
+
this._createHdrPostProcess(scene, ratio);
|
|
638
|
+
// Create depth-of-field source post-process post hdr and disable it now
|
|
639
|
+
this.hdrFinalPostProcess = new PostProcess("HDRPostHDReDepthOfFieldSource", "standard", [], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define PASS_POST_PROCESS", 0);
|
|
640
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRPostHDReDepthOfFieldSource", () => {
|
|
641
|
+
return this.hdrFinalPostProcess;
|
|
642
|
+
}, true));
|
|
643
|
+
}
|
|
644
|
+
if (this._depthOfFieldEnabled) {
|
|
645
|
+
// Create gaussian blur used by depth-of-field
|
|
646
|
+
this._createBlurPostProcesses(scene, ratio / 2, 3, "depthOfFieldBlurWidth");
|
|
647
|
+
// Create depth-of-field post-process
|
|
648
|
+
this._createDepthOfFieldPostProcess(scene, ratio);
|
|
649
|
+
}
|
|
650
|
+
if (this._motionBlurEnabled) {
|
|
651
|
+
// Create motion blur post-process
|
|
652
|
+
this._createMotionBlurPostProcess(scene, ratio);
|
|
653
|
+
}
|
|
654
|
+
if (this._fxaaEnabled) {
|
|
655
|
+
// Create fxaa post-process
|
|
656
|
+
this.fxaaPostProcess = new FxaaPostProcess("fxaa", 1.0, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, 0);
|
|
657
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRFxaa", () => {
|
|
658
|
+
return this.fxaaPostProcess;
|
|
659
|
+
}, true));
|
|
660
|
+
}
|
|
661
|
+
if (this._cameras !== null) {
|
|
662
|
+
this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name, this._cameras);
|
|
663
|
+
}
|
|
664
|
+
if (!this._enableMSAAOnFirstPostProcess(this._samples) && this._samples > 1) {
|
|
665
|
+
Logger.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0");
|
|
666
|
+
}
|
|
943
667
|
}
|
|
944
|
-
|
|
945
|
-
|
|
668
|
+
// Down Sample X4 Post-Process
|
|
669
|
+
_createDownSampleX4PostProcess(scene, ratio) {
|
|
670
|
+
const downSampleX4Offsets = new Array(32);
|
|
671
|
+
this.downSampleX4PostProcess = new PostProcess("HDRDownSampleX4", "standard", ["dsOffsets"], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define DOWN_SAMPLE_X4", this._floatTextureType);
|
|
672
|
+
this.downSampleX4PostProcess.onApply = (effect) => {
|
|
673
|
+
let id = 0;
|
|
674
|
+
const width = this.downSampleX4PostProcess.width;
|
|
675
|
+
const height = this.downSampleX4PostProcess.height;
|
|
676
|
+
for (let i = -2; i < 2; i++) {
|
|
677
|
+
for (let j = -2; j < 2; j++) {
|
|
678
|
+
downSampleX4Offsets[id] = (i + 0.5) * (1.0 / width);
|
|
679
|
+
downSampleX4Offsets[id + 1] = (j + 0.5) * (1.0 / height);
|
|
680
|
+
id += 2;
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
effect.setArray2("dsOffsets", downSampleX4Offsets);
|
|
684
|
+
};
|
|
685
|
+
// Add to pipeline
|
|
686
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRDownSampleX4", () => {
|
|
687
|
+
return this.downSampleX4PostProcess;
|
|
688
|
+
}, true));
|
|
946
689
|
}
|
|
947
|
-
|
|
948
|
-
|
|
690
|
+
// Brightpass Post-Process
|
|
691
|
+
_createBrightPassPostProcess(scene, ratio) {
|
|
692
|
+
const brightOffsets = new Array(8);
|
|
693
|
+
this.brightPassPostProcess = new PostProcess("HDRBrightPass", "standard", ["dsOffsets", "brightThreshold"], [], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define BRIGHT_PASS", this._floatTextureType);
|
|
694
|
+
this.brightPassPostProcess.onApply = (effect) => {
|
|
695
|
+
const sU = 1.0 / this.brightPassPostProcess.width;
|
|
696
|
+
const sV = 1.0 / this.brightPassPostProcess.height;
|
|
697
|
+
brightOffsets[0] = -0.5 * sU;
|
|
698
|
+
brightOffsets[1] = 0.5 * sV;
|
|
699
|
+
brightOffsets[2] = 0.5 * sU;
|
|
700
|
+
brightOffsets[3] = 0.5 * sV;
|
|
701
|
+
brightOffsets[4] = -0.5 * sU;
|
|
702
|
+
brightOffsets[5] = -0.5 * sV;
|
|
703
|
+
brightOffsets[6] = 0.5 * sU;
|
|
704
|
+
brightOffsets[7] = -0.5 * sV;
|
|
705
|
+
effect.setArray2("dsOffsets", brightOffsets);
|
|
706
|
+
effect.setFloat("brightThreshold", this.brightThreshold);
|
|
707
|
+
};
|
|
708
|
+
// Add to pipeline
|
|
709
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRBrightPass", () => {
|
|
710
|
+
return this.brightPassPostProcess;
|
|
711
|
+
}, true));
|
|
949
712
|
}
|
|
950
|
-
|
|
951
|
-
|
|
713
|
+
// Create blur H&V post-processes
|
|
714
|
+
_createBlurPostProcesses(scene, ratio, indice, blurWidthKey = "blurWidth") {
|
|
715
|
+
const engine = scene.getEngine();
|
|
716
|
+
const blurX = new BlurPostProcess("HDRBlurH" + "_" + indice, new Vector2(1, 0), this[blurWidthKey], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, this._floatTextureType);
|
|
717
|
+
const blurY = new BlurPostProcess("HDRBlurV" + "_" + indice, new Vector2(0, 1), this[blurWidthKey], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, this._floatTextureType);
|
|
718
|
+
blurX.onActivateObservable.add(() => {
|
|
719
|
+
const dw = blurX.width / engine.getRenderWidth();
|
|
720
|
+
blurX.kernel = this[blurWidthKey] * dw;
|
|
721
|
+
});
|
|
722
|
+
blurY.onActivateObservable.add(() => {
|
|
723
|
+
const dw = blurY.height / engine.getRenderHeight();
|
|
724
|
+
blurY.kernel = this.horizontalBlur ? 64 * dw : this[blurWidthKey] * dw;
|
|
725
|
+
});
|
|
726
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRBlurH" + indice, () => {
|
|
727
|
+
return blurX;
|
|
728
|
+
}, true));
|
|
729
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRBlurV" + indice, () => {
|
|
730
|
+
return blurY;
|
|
731
|
+
}, true));
|
|
732
|
+
this.blurHPostProcesses.push(blurX);
|
|
733
|
+
this.blurVPostProcesses.push(blurY);
|
|
952
734
|
}
|
|
953
|
-
|
|
954
|
-
|
|
735
|
+
// Create texture adder post-process
|
|
736
|
+
_createTextureAdderPostProcess(scene, ratio) {
|
|
737
|
+
this.textureAdderPostProcess = new PostProcess("HDRTextureAdder", "standard", ["exposure"], ["otherSampler", "lensSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define TEXTURE_ADDER", this._floatTextureType);
|
|
738
|
+
this.textureAdderPostProcess.onApply = (effect) => {
|
|
739
|
+
effect.setTextureFromPostProcess("otherSampler", this._vlsEnabled ? this._currentDepthOfFieldSource : this.originalPostProcess);
|
|
740
|
+
effect.setTexture("lensSampler", this.lensTexture);
|
|
741
|
+
effect.setFloat("exposure", this._currentExposure);
|
|
742
|
+
this._currentDepthOfFieldSource = this.textureAdderFinalPostProcess;
|
|
743
|
+
};
|
|
744
|
+
// Add to pipeline
|
|
745
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRTextureAdder", () => {
|
|
746
|
+
return this.textureAdderPostProcess;
|
|
747
|
+
}, true));
|
|
955
748
|
}
|
|
956
|
-
|
|
957
|
-
|
|
749
|
+
_createVolumetricLightPostProcess(scene, ratio) {
|
|
750
|
+
const geometryRenderer = scene.enableGeometryBufferRenderer();
|
|
751
|
+
geometryRenderer.enablePosition = true;
|
|
752
|
+
const geometry = geometryRenderer.getGBuffer();
|
|
753
|
+
// Base post-process
|
|
754
|
+
this.volumetricLightPostProcess = new PostProcess("HDRVLS", "standard", ["shadowViewProjection", "cameraPosition", "sunDirection", "sunColor", "scatteringCoefficient", "scatteringPower", "depthValues"], ["shadowMapSampler", "positionSampler"], ratio / 8, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define VLS\n#define NB_STEPS " + this._volumetricLightStepsCount.toFixed(1));
|
|
755
|
+
const depthValues = Vector2.Zero();
|
|
756
|
+
this.volumetricLightPostProcess.onApply = (effect) => {
|
|
757
|
+
if (this.sourceLight && this.sourceLight.getShadowGenerator() && this._scene.activeCamera) {
|
|
758
|
+
const generator = this.sourceLight.getShadowGenerator();
|
|
759
|
+
effect.setTexture("shadowMapSampler", generator.getShadowMap());
|
|
760
|
+
effect.setTexture("positionSampler", geometry.textures[2]);
|
|
761
|
+
effect.setColor3("sunColor", this.sourceLight.diffuse);
|
|
762
|
+
effect.setVector3("sunDirection", this.sourceLight.getShadowDirection());
|
|
763
|
+
effect.setVector3("cameraPosition", this._scene.activeCamera.globalPosition);
|
|
764
|
+
effect.setMatrix("shadowViewProjection", generator.getTransformMatrix());
|
|
765
|
+
effect.setFloat("scatteringCoefficient", this.volumetricLightCoefficient);
|
|
766
|
+
effect.setFloat("scatteringPower", this.volumetricLightPower);
|
|
767
|
+
depthValues.x = this.sourceLight.getDepthMinZ(this._scene.activeCamera);
|
|
768
|
+
depthValues.y = this.sourceLight.getDepthMaxZ(this._scene.activeCamera);
|
|
769
|
+
effect.setVector2("depthValues", depthValues);
|
|
770
|
+
}
|
|
771
|
+
};
|
|
772
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRVLS", () => {
|
|
773
|
+
return this.volumetricLightPostProcess;
|
|
774
|
+
}, true));
|
|
775
|
+
// Smooth
|
|
776
|
+
this._createBlurPostProcesses(scene, ratio / 4, 0, "volumetricLightBlurScale");
|
|
777
|
+
// Merge
|
|
778
|
+
this.volumetricLightMergePostProces = new PostProcess("HDRVLSMerge", "standard", [], ["originalSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define VLSMERGE");
|
|
779
|
+
this.volumetricLightMergePostProces.onApply = (effect) => {
|
|
780
|
+
effect.setTextureFromPostProcess("originalSampler", this._bloomEnabled ? this.textureAdderFinalPostProcess : this.originalPostProcess);
|
|
781
|
+
this._currentDepthOfFieldSource = this.volumetricLightFinalPostProcess;
|
|
782
|
+
};
|
|
783
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRVLSMerge", () => {
|
|
784
|
+
return this.volumetricLightMergePostProces;
|
|
785
|
+
}, true));
|
|
958
786
|
}
|
|
959
|
-
|
|
960
|
-
|
|
787
|
+
// Create luminance
|
|
788
|
+
_createLuminancePostProcesses(scene, textureType) {
|
|
789
|
+
// Create luminance
|
|
790
|
+
let size = Math.pow(3, _a.LuminanceSteps);
|
|
791
|
+
this.luminancePostProcess = new PostProcess("HDRLuminance", "standard", ["lumOffsets"], [], { width: size, height: size }, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define LUMINANCE", textureType);
|
|
792
|
+
const offsets = [];
|
|
793
|
+
this.luminancePostProcess.onApply = (effect) => {
|
|
794
|
+
const sU = 1.0 / this.luminancePostProcess.width;
|
|
795
|
+
const sV = 1.0 / this.luminancePostProcess.height;
|
|
796
|
+
offsets[0] = -0.5 * sU;
|
|
797
|
+
offsets[1] = 0.5 * sV;
|
|
798
|
+
offsets[2] = 0.5 * sU;
|
|
799
|
+
offsets[3] = 0.5 * sV;
|
|
800
|
+
offsets[4] = -0.5 * sU;
|
|
801
|
+
offsets[5] = -0.5 * sV;
|
|
802
|
+
offsets[6] = 0.5 * sU;
|
|
803
|
+
offsets[7] = -0.5 * sV;
|
|
804
|
+
effect.setArray2("lumOffsets", offsets);
|
|
805
|
+
};
|
|
806
|
+
// Add to pipeline
|
|
807
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRLuminance", () => {
|
|
808
|
+
return this.luminancePostProcess;
|
|
809
|
+
}, true));
|
|
810
|
+
// Create down sample luminance
|
|
811
|
+
for (let i = _a.LuminanceSteps - 1; i >= 0; i--) {
|
|
812
|
+
size = Math.pow(3, i);
|
|
813
|
+
let defines = "#define LUMINANCE_DOWN_SAMPLE\n";
|
|
814
|
+
if (i === 0) {
|
|
815
|
+
defines += "#define FINAL_DOWN_SAMPLER";
|
|
816
|
+
}
|
|
817
|
+
const postProcess = new PostProcess("HDRLuminanceDownSample" + i, "standard", ["dsOffsets", "halfDestPixelSize"], [], { width: size, height: size }, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, defines, textureType);
|
|
818
|
+
this.luminanceDownSamplePostProcesses.push(postProcess);
|
|
819
|
+
}
|
|
820
|
+
// Create callbacks and add effects
|
|
821
|
+
let lastLuminance = this.luminancePostProcess;
|
|
822
|
+
for (let index = 0; index < this.luminanceDownSamplePostProcesses.length; index++) {
|
|
823
|
+
const pp = this.luminanceDownSamplePostProcesses[index];
|
|
824
|
+
const downSampleOffsets = new Array(18);
|
|
825
|
+
pp.onApply = (effect) => {
|
|
826
|
+
if (!lastLuminance) {
|
|
827
|
+
return;
|
|
828
|
+
}
|
|
829
|
+
let id = 0;
|
|
830
|
+
for (let x = -1; x < 2; x++) {
|
|
831
|
+
for (let y = -1; y < 2; y++) {
|
|
832
|
+
downSampleOffsets[id] = x / lastLuminance.width;
|
|
833
|
+
downSampleOffsets[id + 1] = y / lastLuminance.height;
|
|
834
|
+
id += 2;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
effect.setArray2("dsOffsets", downSampleOffsets);
|
|
838
|
+
effect.setFloat("halfDestPixelSize", 0.5 / lastLuminance.width);
|
|
839
|
+
if (index === this.luminanceDownSamplePostProcesses.length - 1) {
|
|
840
|
+
lastLuminance = this.luminancePostProcess;
|
|
841
|
+
}
|
|
842
|
+
else {
|
|
843
|
+
lastLuminance = pp;
|
|
844
|
+
}
|
|
845
|
+
};
|
|
846
|
+
if (index === this.luminanceDownSamplePostProcesses.length - 1) {
|
|
847
|
+
pp.onAfterRender = () => {
|
|
848
|
+
const pixel = scene.getEngine().readPixels(0, 0, 1, 1);
|
|
849
|
+
const bit_shift = new Vector4(1.0 / (255.0 * 255.0 * 255.0), 1.0 / (255.0 * 255.0), 1.0 / 255.0, 1.0);
|
|
850
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then
|
|
851
|
+
pixel.then((pixel) => {
|
|
852
|
+
const data = new Uint8Array(pixel.buffer);
|
|
853
|
+
this._hdrCurrentLuminance = (data[0] * bit_shift.x + data[1] * bit_shift.y + data[2] * bit_shift.z + data[3] * bit_shift.w) / 100.0;
|
|
854
|
+
});
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRLuminanceDownSample" + index, () => {
|
|
858
|
+
return pp;
|
|
859
|
+
}, true));
|
|
860
|
+
}
|
|
961
861
|
}
|
|
962
|
-
|
|
963
|
-
|
|
862
|
+
// Create HDR post-process
|
|
863
|
+
_createHdrPostProcess(scene, ratio) {
|
|
864
|
+
const defines = ["#define HDR"];
|
|
865
|
+
if (this._hdrAutoExposure) {
|
|
866
|
+
defines.push("#define AUTO_EXPOSURE");
|
|
867
|
+
}
|
|
868
|
+
this.hdrPostProcess = new PostProcess("HDR", "standard", ["averageLuminance"], ["textureAdderSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, defines.join("\n"), 0);
|
|
869
|
+
let outputLiminance = 1;
|
|
870
|
+
let time = 0;
|
|
871
|
+
let lastTime = 0;
|
|
872
|
+
this.hdrPostProcess.onApply = (effect) => {
|
|
873
|
+
effect.setTextureFromPostProcess("textureAdderSampler", this._currentDepthOfFieldSource);
|
|
874
|
+
time += scene.getEngine().getDeltaTime();
|
|
875
|
+
if (outputLiminance < 0) {
|
|
876
|
+
outputLiminance = this._hdrCurrentLuminance;
|
|
877
|
+
}
|
|
878
|
+
else {
|
|
879
|
+
const dt = (lastTime - time) / 1000.0;
|
|
880
|
+
if (this._hdrCurrentLuminance < outputLiminance + this.hdrDecreaseRate * dt) {
|
|
881
|
+
outputLiminance += this.hdrDecreaseRate * dt;
|
|
882
|
+
}
|
|
883
|
+
else if (this._hdrCurrentLuminance > outputLiminance - this.hdrIncreaseRate * dt) {
|
|
884
|
+
outputLiminance -= this.hdrIncreaseRate * dt;
|
|
885
|
+
}
|
|
886
|
+
else {
|
|
887
|
+
outputLiminance = this._hdrCurrentLuminance;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
if (this.hdrAutoExposure) {
|
|
891
|
+
this._currentExposure = this._fixedExposure / outputLiminance;
|
|
892
|
+
}
|
|
893
|
+
else {
|
|
894
|
+
outputLiminance = Clamp(outputLiminance, this.hdrMinimumLuminance, 1e20);
|
|
895
|
+
effect.setFloat("averageLuminance", outputLiminance);
|
|
896
|
+
}
|
|
897
|
+
lastTime = time;
|
|
898
|
+
this._currentDepthOfFieldSource = this.hdrFinalPostProcess;
|
|
899
|
+
};
|
|
900
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDR", () => {
|
|
901
|
+
return this.hdrPostProcess;
|
|
902
|
+
}, true));
|
|
964
903
|
}
|
|
965
|
-
|
|
966
|
-
|
|
904
|
+
// Create lens flare post-process
|
|
905
|
+
_createLensFlarePostProcess(scene, ratio) {
|
|
906
|
+
this.lensFlarePostProcess = new PostProcess("HDRLensFlare", "standard", ["strength", "ghostDispersal", "haloWidth", "resolution", "distortionStrength"], ["lensColorSampler"], ratio / 2, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define LENS_FLARE", 0);
|
|
907
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRLensFlare", () => {
|
|
908
|
+
return this.lensFlarePostProcess;
|
|
909
|
+
}, true));
|
|
910
|
+
this._createBlurPostProcesses(scene, ratio / 4, 2, "lensFlareBlurWidth");
|
|
911
|
+
this.lensFlareComposePostProcess = new PostProcess("HDRLensFlareCompose", "standard", ["lensStarMatrix"], ["otherSampler", "lensDirtSampler", "lensStarSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define LENS_FLARE_COMPOSE", 0);
|
|
912
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRLensFlareCompose", () => {
|
|
913
|
+
return this.lensFlareComposePostProcess;
|
|
914
|
+
}, true));
|
|
915
|
+
const resolution = new Vector2(0, 0);
|
|
916
|
+
// Lens flare
|
|
917
|
+
this.lensFlarePostProcess.externalTextureSamplerBinding = true;
|
|
918
|
+
this.lensFlarePostProcess.onApply = (effect) => {
|
|
919
|
+
effect.setTextureFromPostProcess("textureSampler", this._bloomEnabled ? this.blurHPostProcesses[0] : this.originalPostProcess);
|
|
920
|
+
effect.setTexture("lensColorSampler", this.lensColorTexture);
|
|
921
|
+
effect.setFloat("strength", this.lensFlareStrength);
|
|
922
|
+
effect.setFloat("ghostDispersal", this.lensFlareGhostDispersal);
|
|
923
|
+
effect.setFloat("haloWidth", this.lensFlareHaloWidth);
|
|
924
|
+
// Shift
|
|
925
|
+
resolution.x = this.lensFlarePostProcess.width;
|
|
926
|
+
resolution.y = this.lensFlarePostProcess.height;
|
|
927
|
+
effect.setVector2("resolution", resolution);
|
|
928
|
+
effect.setFloat("distortionStrength", this.lensFlareDistortionStrength);
|
|
929
|
+
};
|
|
930
|
+
// Compose
|
|
931
|
+
const scaleBias1 = Matrix.FromValues(2.0, 0.0, -1.0, 0.0, 0.0, 2.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
|
|
932
|
+
const scaleBias2 = Matrix.FromValues(0.5, 0.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
|
|
933
|
+
this.lensFlareComposePostProcess.onApply = (effect) => {
|
|
934
|
+
if (!this._scene.activeCamera) {
|
|
935
|
+
return;
|
|
936
|
+
}
|
|
937
|
+
effect.setTextureFromPostProcess("otherSampler", this.lensFlarePostProcess);
|
|
938
|
+
effect.setTexture("lensDirtSampler", this.lensFlareDirtTexture);
|
|
939
|
+
effect.setTexture("lensStarSampler", this.lensStarTexture);
|
|
940
|
+
// Lens start rotation matrix
|
|
941
|
+
const camerax = this._scene.activeCamera.getViewMatrix().getRow(0);
|
|
942
|
+
const cameraz = this._scene.activeCamera.getViewMatrix().getRow(2);
|
|
943
|
+
let camRot = Vector3.Dot(camerax.toVector3(), new Vector3(1.0, 0.0, 0.0)) + Vector3.Dot(cameraz.toVector3(), new Vector3(0.0, 0.0, 1.0));
|
|
944
|
+
camRot *= 4.0;
|
|
945
|
+
const starRotation = Matrix.FromValues(Math.cos(camRot) * 0.5, -Math.sin(camRot), 0.0, 0.0, Math.sin(camRot), Math.cos(camRot) * 0.5, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
|
|
946
|
+
const lensStarMatrix = scaleBias2.multiply(starRotation).multiply(scaleBias1);
|
|
947
|
+
effect.setMatrix("lensStarMatrix", lensStarMatrix);
|
|
948
|
+
this._currentDepthOfFieldSource = this.lensFlareFinalPostProcess;
|
|
949
|
+
};
|
|
967
950
|
}
|
|
968
|
-
|
|
969
|
-
|
|
951
|
+
// Create depth-of-field post-process
|
|
952
|
+
_createDepthOfFieldPostProcess(scene, ratio) {
|
|
953
|
+
this.depthOfFieldPostProcess = new PostProcess("HDRDepthOfField", "standard", ["distance"], ["otherSampler", "depthSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define DEPTH_OF_FIELD", 0);
|
|
954
|
+
this.depthOfFieldPostProcess.onApply = (effect) => {
|
|
955
|
+
effect.setTextureFromPostProcess("otherSampler", this._currentDepthOfFieldSource);
|
|
956
|
+
effect.setTexture("depthSampler", this._getDepthTexture());
|
|
957
|
+
effect.setFloat("distance", this.depthOfFieldDistance);
|
|
958
|
+
};
|
|
959
|
+
// Add to pipeline
|
|
960
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRDepthOfField", () => {
|
|
961
|
+
return this.depthOfFieldPostProcess;
|
|
962
|
+
}, true));
|
|
970
963
|
}
|
|
971
|
-
|
|
972
|
-
|
|
964
|
+
// Create motion blur post-process
|
|
965
|
+
_createMotionBlurPostProcess(scene, ratio) {
|
|
966
|
+
if (this._isObjectBasedMotionBlur) {
|
|
967
|
+
const mb = new MotionBlurPostProcess("HDRMotionBlur", scene, ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, 0);
|
|
968
|
+
mb.motionStrength = this.motionStrength;
|
|
969
|
+
mb.motionBlurSamples = this.motionBlurSamples;
|
|
970
|
+
this.motionBlurPostProcess = mb;
|
|
971
|
+
}
|
|
972
|
+
else {
|
|
973
|
+
this.motionBlurPostProcess = new PostProcess("HDRMotionBlur", "standard", ["inverseViewProjection", "prevViewProjection", "screenSize", "motionScale", "motionStrength"], ["depthSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define MOTION_BLUR\n#define MAX_MOTION_SAMPLES " + this.motionBlurSamples.toFixed(1), 0);
|
|
974
|
+
let motionScale = 0;
|
|
975
|
+
let prevViewProjection = Matrix.Identity();
|
|
976
|
+
const invViewProjection = Matrix.Identity();
|
|
977
|
+
let viewProjection = Matrix.Identity();
|
|
978
|
+
const screenSize = Vector2.Zero();
|
|
979
|
+
this.motionBlurPostProcess.onApply = (effect) => {
|
|
980
|
+
viewProjection = scene.getProjectionMatrix().multiply(scene.getViewMatrix());
|
|
981
|
+
viewProjection.invertToRef(invViewProjection);
|
|
982
|
+
effect.setMatrix("inverseViewProjection", invViewProjection);
|
|
983
|
+
effect.setMatrix("prevViewProjection", prevViewProjection);
|
|
984
|
+
prevViewProjection = viewProjection;
|
|
985
|
+
screenSize.x = this.motionBlurPostProcess.width;
|
|
986
|
+
screenSize.y = this.motionBlurPostProcess.height;
|
|
987
|
+
effect.setVector2("screenSize", screenSize);
|
|
988
|
+
motionScale = scene.getEngine().getFps() / 60.0;
|
|
989
|
+
effect.setFloat("motionScale", motionScale);
|
|
990
|
+
effect.setFloat("motionStrength", this.motionStrength);
|
|
991
|
+
effect.setTexture("depthSampler", this._getDepthTexture());
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRMotionBlur", () => {
|
|
995
|
+
return this.motionBlurPostProcess;
|
|
996
|
+
}, true));
|
|
997
|
+
}
|
|
998
|
+
_getDepthTexture() {
|
|
999
|
+
if (this._scene.getEngine().getCaps().drawBuffersExtension) {
|
|
1000
|
+
const renderer = this._scene.enableGeometryBufferRenderer();
|
|
1001
|
+
return renderer.getGBuffer().textures[0];
|
|
1002
|
+
}
|
|
1003
|
+
return this._scene.enableDepthRenderer().getDepthMap();
|
|
1004
|
+
}
|
|
1005
|
+
_disposePostProcesses() {
|
|
1006
|
+
for (let i = 0; i < this._cameras.length; i++) {
|
|
1007
|
+
const camera = this._cameras[i];
|
|
1008
|
+
if (this.originalPostProcess) {
|
|
1009
|
+
this.originalPostProcess.dispose(camera);
|
|
1010
|
+
}
|
|
1011
|
+
if (this.screenSpaceReflectionPostProcess) {
|
|
1012
|
+
this.screenSpaceReflectionPostProcess.dispose(camera);
|
|
1013
|
+
}
|
|
1014
|
+
if (this.downSampleX4PostProcess) {
|
|
1015
|
+
this.downSampleX4PostProcess.dispose(camera);
|
|
1016
|
+
}
|
|
1017
|
+
if (this.brightPassPostProcess) {
|
|
1018
|
+
this.brightPassPostProcess.dispose(camera);
|
|
1019
|
+
}
|
|
1020
|
+
if (this.textureAdderPostProcess) {
|
|
1021
|
+
this.textureAdderPostProcess.dispose(camera);
|
|
1022
|
+
}
|
|
1023
|
+
if (this.volumetricLightPostProcess) {
|
|
1024
|
+
this.volumetricLightPostProcess.dispose(camera);
|
|
1025
|
+
}
|
|
1026
|
+
if (this.volumetricLightSmoothXPostProcess) {
|
|
1027
|
+
this.volumetricLightSmoothXPostProcess.dispose(camera);
|
|
1028
|
+
}
|
|
1029
|
+
if (this.volumetricLightSmoothYPostProcess) {
|
|
1030
|
+
this.volumetricLightSmoothYPostProcess.dispose(camera);
|
|
1031
|
+
}
|
|
1032
|
+
if (this.volumetricLightMergePostProces) {
|
|
1033
|
+
this.volumetricLightMergePostProces.dispose(camera);
|
|
1034
|
+
}
|
|
1035
|
+
if (this.volumetricLightFinalPostProcess) {
|
|
1036
|
+
this.volumetricLightFinalPostProcess.dispose(camera);
|
|
1037
|
+
}
|
|
1038
|
+
if (this.lensFlarePostProcess) {
|
|
1039
|
+
this.lensFlarePostProcess.dispose(camera);
|
|
1040
|
+
}
|
|
1041
|
+
if (this.lensFlareComposePostProcess) {
|
|
1042
|
+
this.lensFlareComposePostProcess.dispose(camera);
|
|
1043
|
+
}
|
|
1044
|
+
for (let j = 0; j < this.luminanceDownSamplePostProcesses.length; j++) {
|
|
1045
|
+
this.luminanceDownSamplePostProcesses[j].dispose(camera);
|
|
1046
|
+
}
|
|
1047
|
+
if (this.luminancePostProcess) {
|
|
1048
|
+
this.luminancePostProcess.dispose(camera);
|
|
1049
|
+
}
|
|
1050
|
+
if (this.hdrPostProcess) {
|
|
1051
|
+
this.hdrPostProcess.dispose(camera);
|
|
1052
|
+
}
|
|
1053
|
+
if (this.hdrFinalPostProcess) {
|
|
1054
|
+
this.hdrFinalPostProcess.dispose(camera);
|
|
1055
|
+
}
|
|
1056
|
+
if (this.depthOfFieldPostProcess) {
|
|
1057
|
+
this.depthOfFieldPostProcess.dispose(camera);
|
|
1058
|
+
}
|
|
1059
|
+
if (this.motionBlurPostProcess) {
|
|
1060
|
+
this.motionBlurPostProcess.dispose(camera);
|
|
1061
|
+
}
|
|
1062
|
+
if (this.fxaaPostProcess) {
|
|
1063
|
+
this.fxaaPostProcess.dispose(camera);
|
|
1064
|
+
}
|
|
1065
|
+
for (let j = 0; j < this.blurHPostProcesses.length; j++) {
|
|
1066
|
+
this.blurHPostProcesses[j].dispose(camera);
|
|
1067
|
+
}
|
|
1068
|
+
for (let j = 0; j < this.blurVPostProcesses.length; j++) {
|
|
1069
|
+
this.blurVPostProcesses[j].dispose(camera);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
this.originalPostProcess = null;
|
|
1073
|
+
this.downSampleX4PostProcess = null;
|
|
1074
|
+
this.brightPassPostProcess = null;
|
|
1075
|
+
this.textureAdderPostProcess = null;
|
|
1076
|
+
this.textureAdderFinalPostProcess = null;
|
|
1077
|
+
this.volumetricLightPostProcess = null;
|
|
1078
|
+
this.volumetricLightSmoothXPostProcess = null;
|
|
1079
|
+
this.volumetricLightSmoothYPostProcess = null;
|
|
1080
|
+
this.volumetricLightMergePostProces = null;
|
|
1081
|
+
this.volumetricLightFinalPostProcess = null;
|
|
1082
|
+
this.lensFlarePostProcess = null;
|
|
1083
|
+
this.lensFlareComposePostProcess = null;
|
|
1084
|
+
this.luminancePostProcess = null;
|
|
1085
|
+
this.hdrPostProcess = null;
|
|
1086
|
+
this.hdrFinalPostProcess = null;
|
|
1087
|
+
this.depthOfFieldPostProcess = null;
|
|
1088
|
+
this.motionBlurPostProcess = null;
|
|
1089
|
+
this.fxaaPostProcess = null;
|
|
1090
|
+
this.screenSpaceReflectionPostProcess = null;
|
|
1091
|
+
this.luminanceDownSamplePostProcesses.length = 0;
|
|
1092
|
+
this.blurHPostProcesses.length = 0;
|
|
1093
|
+
this.blurVPostProcesses.length = 0;
|
|
973
1094
|
}
|
|
974
|
-
|
|
975
|
-
|
|
1095
|
+
/**
|
|
1096
|
+
* Dispose of the pipeline and stop all post processes
|
|
1097
|
+
*/
|
|
1098
|
+
dispose() {
|
|
1099
|
+
this._disposePostProcesses();
|
|
1100
|
+
this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
|
|
1101
|
+
this._scene.postProcessRenderPipelineManager.removePipeline(this._name);
|
|
1102
|
+
super.dispose();
|
|
976
1103
|
}
|
|
977
|
-
|
|
978
|
-
|
|
1104
|
+
/**
|
|
1105
|
+
* Serialize the rendering pipeline (Used when exporting)
|
|
1106
|
+
* @returns the serialized object
|
|
1107
|
+
*/
|
|
1108
|
+
serialize() {
|
|
1109
|
+
const serializationObject = SerializationHelper.Serialize(this);
|
|
1110
|
+
if (this.sourceLight) {
|
|
1111
|
+
serializationObject.sourceLightId = this.sourceLight.id;
|
|
1112
|
+
}
|
|
1113
|
+
if (this.screenSpaceReflectionPostProcess) {
|
|
1114
|
+
serializationObject.screenSpaceReflectionPostProcess = SerializationHelper.Serialize(this.screenSpaceReflectionPostProcess);
|
|
1115
|
+
}
|
|
1116
|
+
serializationObject.customType = "StandardRenderingPipeline";
|
|
1117
|
+
return serializationObject;
|
|
979
1118
|
}
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
serialize()
|
|
1065
|
-
], StandardRenderingPipeline.prototype, "hdrIncreaseRate", void 0);
|
|
1066
|
-
__decorate([
|
|
1067
|
-
serialize()
|
|
1068
|
-
], StandardRenderingPipeline.prototype, "hdrAutoExposure", null);
|
|
1069
|
-
__decorate([
|
|
1070
|
-
serializeAsTexture("lensColorTexture")
|
|
1071
|
-
], StandardRenderingPipeline.prototype, "lensColorTexture", void 0);
|
|
1072
|
-
__decorate([
|
|
1073
|
-
serialize()
|
|
1074
|
-
], StandardRenderingPipeline.prototype, "lensFlareStrength", void 0);
|
|
1075
|
-
__decorate([
|
|
1076
|
-
serialize()
|
|
1077
|
-
], StandardRenderingPipeline.prototype, "lensFlareGhostDispersal", void 0);
|
|
1078
|
-
__decorate([
|
|
1079
|
-
serialize()
|
|
1080
|
-
], StandardRenderingPipeline.prototype, "lensFlareHaloWidth", void 0);
|
|
1081
|
-
__decorate([
|
|
1082
|
-
serialize()
|
|
1083
|
-
], StandardRenderingPipeline.prototype, "lensFlareDistortionStrength", void 0);
|
|
1084
|
-
__decorate([
|
|
1085
|
-
serialize()
|
|
1086
|
-
], StandardRenderingPipeline.prototype, "lensFlareBlurWidth", void 0);
|
|
1087
|
-
__decorate([
|
|
1088
|
-
serializeAsTexture("lensStarTexture")
|
|
1089
|
-
], StandardRenderingPipeline.prototype, "lensStarTexture", void 0);
|
|
1090
|
-
__decorate([
|
|
1091
|
-
serializeAsTexture("lensFlareDirtTexture")
|
|
1092
|
-
], StandardRenderingPipeline.prototype, "lensFlareDirtTexture", void 0);
|
|
1093
|
-
__decorate([
|
|
1094
|
-
serialize()
|
|
1095
|
-
], StandardRenderingPipeline.prototype, "depthOfFieldDistance", void 0);
|
|
1096
|
-
__decorate([
|
|
1097
|
-
serialize()
|
|
1098
|
-
], StandardRenderingPipeline.prototype, "depthOfFieldBlurWidth", void 0);
|
|
1099
|
-
__decorate([
|
|
1100
|
-
serialize()
|
|
1101
|
-
], StandardRenderingPipeline.prototype, "motionStrength", null);
|
|
1102
|
-
__decorate([
|
|
1103
|
-
serialize()
|
|
1104
|
-
], StandardRenderingPipeline.prototype, "objectBasedMotionBlur", null);
|
|
1105
|
-
__decorate([
|
|
1106
|
-
serialize()
|
|
1107
|
-
], StandardRenderingPipeline.prototype, "_ratio", void 0);
|
|
1108
|
-
__decorate([
|
|
1109
|
-
serialize()
|
|
1110
|
-
], StandardRenderingPipeline.prototype, "BloomEnabled", null);
|
|
1111
|
-
__decorate([
|
|
1112
|
-
serialize()
|
|
1113
|
-
], StandardRenderingPipeline.prototype, "DepthOfFieldEnabled", null);
|
|
1114
|
-
__decorate([
|
|
1115
|
-
serialize()
|
|
1116
|
-
], StandardRenderingPipeline.prototype, "LensFlareEnabled", null);
|
|
1117
|
-
__decorate([
|
|
1118
|
-
serialize()
|
|
1119
|
-
], StandardRenderingPipeline.prototype, "HDREnabled", null);
|
|
1120
|
-
__decorate([
|
|
1121
|
-
serialize()
|
|
1122
|
-
], StandardRenderingPipeline.prototype, "VLSEnabled", null);
|
|
1123
|
-
__decorate([
|
|
1124
|
-
serialize()
|
|
1125
|
-
], StandardRenderingPipeline.prototype, "MotionBlurEnabled", null);
|
|
1126
|
-
__decorate([
|
|
1127
|
-
serialize()
|
|
1128
|
-
], StandardRenderingPipeline.prototype, "fxaaEnabled", null);
|
|
1129
|
-
__decorate([
|
|
1130
|
-
serialize()
|
|
1131
|
-
], StandardRenderingPipeline.prototype, "screenSpaceReflectionsEnabled", null);
|
|
1132
|
-
__decorate([
|
|
1133
|
-
serialize()
|
|
1134
|
-
], StandardRenderingPipeline.prototype, "volumetricLightStepsCount", null);
|
|
1135
|
-
__decorate([
|
|
1136
|
-
serialize()
|
|
1137
|
-
], StandardRenderingPipeline.prototype, "motionBlurSamples", null);
|
|
1138
|
-
__decorate([
|
|
1139
|
-
serialize()
|
|
1140
|
-
], StandardRenderingPipeline.prototype, "samples", null);
|
|
1119
|
+
},
|
|
1120
|
+
(() => {
|
|
1121
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1122
|
+
_brightThreshold_decorators = [serialize()];
|
|
1123
|
+
_blurWidth_decorators = [serialize()];
|
|
1124
|
+
_horizontalBlur_decorators = [serialize()];
|
|
1125
|
+
_get_exposure_decorators = [serialize()];
|
|
1126
|
+
_lensTexture_decorators = [serializeAsTexture("lensTexture")];
|
|
1127
|
+
_volumetricLightCoefficient_decorators = [serialize()];
|
|
1128
|
+
_volumetricLightPower_decorators = [serialize()];
|
|
1129
|
+
_volumetricLightBlurScale_decorators = [serialize()];
|
|
1130
|
+
_hdrMinimumLuminance_decorators = [serialize()];
|
|
1131
|
+
_hdrDecreaseRate_decorators = [serialize()];
|
|
1132
|
+
_hdrIncreaseRate_decorators = [serialize()];
|
|
1133
|
+
_get_hdrAutoExposure_decorators = [serialize()];
|
|
1134
|
+
_lensColorTexture_decorators = [serializeAsTexture("lensColorTexture")];
|
|
1135
|
+
_lensFlareStrength_decorators = [serialize()];
|
|
1136
|
+
_lensFlareGhostDispersal_decorators = [serialize()];
|
|
1137
|
+
_lensFlareHaloWidth_decorators = [serialize()];
|
|
1138
|
+
_lensFlareDistortionStrength_decorators = [serialize()];
|
|
1139
|
+
_lensFlareBlurWidth_decorators = [serialize()];
|
|
1140
|
+
_lensStarTexture_decorators = [serializeAsTexture("lensStarTexture")];
|
|
1141
|
+
_lensFlareDirtTexture_decorators = [serializeAsTexture("lensFlareDirtTexture")];
|
|
1142
|
+
_depthOfFieldDistance_decorators = [serialize()];
|
|
1143
|
+
_depthOfFieldBlurWidth_decorators = [serialize()];
|
|
1144
|
+
_get_motionStrength_decorators = [serialize()];
|
|
1145
|
+
_get_objectBasedMotionBlur_decorators = [serialize()];
|
|
1146
|
+
__ratio_decorators = [serialize()];
|
|
1147
|
+
_get_BloomEnabled_decorators = [serialize()];
|
|
1148
|
+
_get_DepthOfFieldEnabled_decorators = [serialize()];
|
|
1149
|
+
_get_LensFlareEnabled_decorators = [serialize()];
|
|
1150
|
+
_get_HDREnabled_decorators = [serialize()];
|
|
1151
|
+
_get_VLSEnabled_decorators = [serialize()];
|
|
1152
|
+
_get_MotionBlurEnabled_decorators = [serialize()];
|
|
1153
|
+
_get_fxaaEnabled_decorators = [serialize()];
|
|
1154
|
+
_get_screenSpaceReflectionsEnabled_decorators = [serialize()];
|
|
1155
|
+
_get_volumetricLightStepsCount_decorators = [serialize()];
|
|
1156
|
+
_get_motionBlurSamples_decorators = [serialize()];
|
|
1157
|
+
_get_samples_decorators = [serialize()];
|
|
1158
|
+
__esDecorate(_a, null, _get_exposure_decorators, { kind: "getter", name: "exposure", static: false, private: false, access: { has: obj => "exposure" in obj, get: obj => obj.exposure }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1159
|
+
__esDecorate(_a, null, _get_hdrAutoExposure_decorators, { kind: "getter", name: "hdrAutoExposure", static: false, private: false, access: { has: obj => "hdrAutoExposure" in obj, get: obj => obj.hdrAutoExposure }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1160
|
+
__esDecorate(_a, null, _get_motionStrength_decorators, { kind: "getter", name: "motionStrength", static: false, private: false, access: { has: obj => "motionStrength" in obj, get: obj => obj.motionStrength }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1161
|
+
__esDecorate(_a, null, _get_objectBasedMotionBlur_decorators, { kind: "getter", name: "objectBasedMotionBlur", static: false, private: false, access: { has: obj => "objectBasedMotionBlur" in obj, get: obj => obj.objectBasedMotionBlur }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1162
|
+
__esDecorate(_a, null, _get_BloomEnabled_decorators, { kind: "getter", name: "BloomEnabled", static: false, private: false, access: { has: obj => "BloomEnabled" in obj, get: obj => obj.BloomEnabled }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1163
|
+
__esDecorate(_a, null, _get_DepthOfFieldEnabled_decorators, { kind: "getter", name: "DepthOfFieldEnabled", static: false, private: false, access: { has: obj => "DepthOfFieldEnabled" in obj, get: obj => obj.DepthOfFieldEnabled }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1164
|
+
__esDecorate(_a, null, _get_LensFlareEnabled_decorators, { kind: "getter", name: "LensFlareEnabled", static: false, private: false, access: { has: obj => "LensFlareEnabled" in obj, get: obj => obj.LensFlareEnabled }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1165
|
+
__esDecorate(_a, null, _get_HDREnabled_decorators, { kind: "getter", name: "HDREnabled", static: false, private: false, access: { has: obj => "HDREnabled" in obj, get: obj => obj.HDREnabled }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1166
|
+
__esDecorate(_a, null, _get_VLSEnabled_decorators, { kind: "getter", name: "VLSEnabled", static: false, private: false, access: { has: obj => "VLSEnabled" in obj, get: obj => obj.VLSEnabled }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1167
|
+
__esDecorate(_a, null, _get_MotionBlurEnabled_decorators, { kind: "getter", name: "MotionBlurEnabled", static: false, private: false, access: { has: obj => "MotionBlurEnabled" in obj, get: obj => obj.MotionBlurEnabled }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1168
|
+
__esDecorate(_a, null, _get_fxaaEnabled_decorators, { kind: "getter", name: "fxaaEnabled", static: false, private: false, access: { has: obj => "fxaaEnabled" in obj, get: obj => obj.fxaaEnabled }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1169
|
+
__esDecorate(_a, null, _get_screenSpaceReflectionsEnabled_decorators, { kind: "getter", name: "screenSpaceReflectionsEnabled", static: false, private: false, access: { has: obj => "screenSpaceReflectionsEnabled" in obj, get: obj => obj.screenSpaceReflectionsEnabled }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1170
|
+
__esDecorate(_a, null, _get_volumetricLightStepsCount_decorators, { kind: "getter", name: "volumetricLightStepsCount", static: false, private: false, access: { has: obj => "volumetricLightStepsCount" in obj, get: obj => obj.volumetricLightStepsCount }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1171
|
+
__esDecorate(_a, null, _get_motionBlurSamples_decorators, { kind: "getter", name: "motionBlurSamples", static: false, private: false, access: { has: obj => "motionBlurSamples" in obj, get: obj => obj.motionBlurSamples }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
1172
|
+
__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);
|
|
1173
|
+
__esDecorate(null, null, _brightThreshold_decorators, { kind: "field", name: "brightThreshold", static: false, private: false, access: { has: obj => "brightThreshold" in obj, get: obj => obj.brightThreshold, set: (obj, value) => { obj.brightThreshold = value; } }, metadata: _metadata }, _brightThreshold_initializers, _brightThreshold_extraInitializers);
|
|
1174
|
+
__esDecorate(null, null, _blurWidth_decorators, { kind: "field", name: "blurWidth", static: false, private: false, access: { has: obj => "blurWidth" in obj, get: obj => obj.blurWidth, set: (obj, value) => { obj.blurWidth = value; } }, metadata: _metadata }, _blurWidth_initializers, _blurWidth_extraInitializers);
|
|
1175
|
+
__esDecorate(null, null, _horizontalBlur_decorators, { kind: "field", name: "horizontalBlur", static: false, private: false, access: { has: obj => "horizontalBlur" in obj, get: obj => obj.horizontalBlur, set: (obj, value) => { obj.horizontalBlur = value; } }, metadata: _metadata }, _horizontalBlur_initializers, _horizontalBlur_extraInitializers);
|
|
1176
|
+
__esDecorate(null, null, _lensTexture_decorators, { kind: "field", name: "lensTexture", static: false, private: false, access: { has: obj => "lensTexture" in obj, get: obj => obj.lensTexture, set: (obj, value) => { obj.lensTexture = value; } }, metadata: _metadata }, _lensTexture_initializers, _lensTexture_extraInitializers);
|
|
1177
|
+
__esDecorate(null, null, _volumetricLightCoefficient_decorators, { kind: "field", name: "volumetricLightCoefficient", static: false, private: false, access: { has: obj => "volumetricLightCoefficient" in obj, get: obj => obj.volumetricLightCoefficient, set: (obj, value) => { obj.volumetricLightCoefficient = value; } }, metadata: _metadata }, _volumetricLightCoefficient_initializers, _volumetricLightCoefficient_extraInitializers);
|
|
1178
|
+
__esDecorate(null, null, _volumetricLightPower_decorators, { kind: "field", name: "volumetricLightPower", static: false, private: false, access: { has: obj => "volumetricLightPower" in obj, get: obj => obj.volumetricLightPower, set: (obj, value) => { obj.volumetricLightPower = value; } }, metadata: _metadata }, _volumetricLightPower_initializers, _volumetricLightPower_extraInitializers);
|
|
1179
|
+
__esDecorate(null, null, _volumetricLightBlurScale_decorators, { kind: "field", name: "volumetricLightBlurScale", static: false, private: false, access: { has: obj => "volumetricLightBlurScale" in obj, get: obj => obj.volumetricLightBlurScale, set: (obj, value) => { obj.volumetricLightBlurScale = value; } }, metadata: _metadata }, _volumetricLightBlurScale_initializers, _volumetricLightBlurScale_extraInitializers);
|
|
1180
|
+
__esDecorate(null, null, _hdrMinimumLuminance_decorators, { kind: "field", name: "hdrMinimumLuminance", static: false, private: false, access: { has: obj => "hdrMinimumLuminance" in obj, get: obj => obj.hdrMinimumLuminance, set: (obj, value) => { obj.hdrMinimumLuminance = value; } }, metadata: _metadata }, _hdrMinimumLuminance_initializers, _hdrMinimumLuminance_extraInitializers);
|
|
1181
|
+
__esDecorate(null, null, _hdrDecreaseRate_decorators, { kind: "field", name: "hdrDecreaseRate", static: false, private: false, access: { has: obj => "hdrDecreaseRate" in obj, get: obj => obj.hdrDecreaseRate, set: (obj, value) => { obj.hdrDecreaseRate = value; } }, metadata: _metadata }, _hdrDecreaseRate_initializers, _hdrDecreaseRate_extraInitializers);
|
|
1182
|
+
__esDecorate(null, null, _hdrIncreaseRate_decorators, { kind: "field", name: "hdrIncreaseRate", static: false, private: false, access: { has: obj => "hdrIncreaseRate" in obj, get: obj => obj.hdrIncreaseRate, set: (obj, value) => { obj.hdrIncreaseRate = value; } }, metadata: _metadata }, _hdrIncreaseRate_initializers, _hdrIncreaseRate_extraInitializers);
|
|
1183
|
+
__esDecorate(null, null, _lensColorTexture_decorators, { kind: "field", name: "lensColorTexture", static: false, private: false, access: { has: obj => "lensColorTexture" in obj, get: obj => obj.lensColorTexture, set: (obj, value) => { obj.lensColorTexture = value; } }, metadata: _metadata }, _lensColorTexture_initializers, _lensColorTexture_extraInitializers);
|
|
1184
|
+
__esDecorate(null, null, _lensFlareStrength_decorators, { kind: "field", name: "lensFlareStrength", static: false, private: false, access: { has: obj => "lensFlareStrength" in obj, get: obj => obj.lensFlareStrength, set: (obj, value) => { obj.lensFlareStrength = value; } }, metadata: _metadata }, _lensFlareStrength_initializers, _lensFlareStrength_extraInitializers);
|
|
1185
|
+
__esDecorate(null, null, _lensFlareGhostDispersal_decorators, { kind: "field", name: "lensFlareGhostDispersal", static: false, private: false, access: { has: obj => "lensFlareGhostDispersal" in obj, get: obj => obj.lensFlareGhostDispersal, set: (obj, value) => { obj.lensFlareGhostDispersal = value; } }, metadata: _metadata }, _lensFlareGhostDispersal_initializers, _lensFlareGhostDispersal_extraInitializers);
|
|
1186
|
+
__esDecorate(null, null, _lensFlareHaloWidth_decorators, { kind: "field", name: "lensFlareHaloWidth", static: false, private: false, access: { has: obj => "lensFlareHaloWidth" in obj, get: obj => obj.lensFlareHaloWidth, set: (obj, value) => { obj.lensFlareHaloWidth = value; } }, metadata: _metadata }, _lensFlareHaloWidth_initializers, _lensFlareHaloWidth_extraInitializers);
|
|
1187
|
+
__esDecorate(null, null, _lensFlareDistortionStrength_decorators, { kind: "field", name: "lensFlareDistortionStrength", static: false, private: false, access: { has: obj => "lensFlareDistortionStrength" in obj, get: obj => obj.lensFlareDistortionStrength, set: (obj, value) => { obj.lensFlareDistortionStrength = value; } }, metadata: _metadata }, _lensFlareDistortionStrength_initializers, _lensFlareDistortionStrength_extraInitializers);
|
|
1188
|
+
__esDecorate(null, null, _lensFlareBlurWidth_decorators, { kind: "field", name: "lensFlareBlurWidth", static: false, private: false, access: { has: obj => "lensFlareBlurWidth" in obj, get: obj => obj.lensFlareBlurWidth, set: (obj, value) => { obj.lensFlareBlurWidth = value; } }, metadata: _metadata }, _lensFlareBlurWidth_initializers, _lensFlareBlurWidth_extraInitializers);
|
|
1189
|
+
__esDecorate(null, null, _lensStarTexture_decorators, { kind: "field", name: "lensStarTexture", static: false, private: false, access: { has: obj => "lensStarTexture" in obj, get: obj => obj.lensStarTexture, set: (obj, value) => { obj.lensStarTexture = value; } }, metadata: _metadata }, _lensStarTexture_initializers, _lensStarTexture_extraInitializers);
|
|
1190
|
+
__esDecorate(null, null, _lensFlareDirtTexture_decorators, { kind: "field", name: "lensFlareDirtTexture", static: false, private: false, access: { has: obj => "lensFlareDirtTexture" in obj, get: obj => obj.lensFlareDirtTexture, set: (obj, value) => { obj.lensFlareDirtTexture = value; } }, metadata: _metadata }, _lensFlareDirtTexture_initializers, _lensFlareDirtTexture_extraInitializers);
|
|
1191
|
+
__esDecorate(null, null, _depthOfFieldDistance_decorators, { kind: "field", name: "depthOfFieldDistance", static: false, private: false, access: { has: obj => "depthOfFieldDistance" in obj, get: obj => obj.depthOfFieldDistance, set: (obj, value) => { obj.depthOfFieldDistance = value; } }, metadata: _metadata }, _depthOfFieldDistance_initializers, _depthOfFieldDistance_extraInitializers);
|
|
1192
|
+
__esDecorate(null, null, _depthOfFieldBlurWidth_decorators, { kind: "field", name: "depthOfFieldBlurWidth", static: false, private: false, access: { has: obj => "depthOfFieldBlurWidth" in obj, get: obj => obj.depthOfFieldBlurWidth, set: (obj, value) => { obj.depthOfFieldBlurWidth = value; } }, metadata: _metadata }, _depthOfFieldBlurWidth_initializers, _depthOfFieldBlurWidth_extraInitializers);
|
|
1193
|
+
__esDecorate(null, null, __ratio_decorators, { kind: "field", name: "_ratio", static: false, private: false, access: { has: obj => "_ratio" in obj, get: obj => obj._ratio, set: (obj, value) => { obj._ratio = value; } }, metadata: _metadata }, __ratio_initializers, __ratio_extraInitializers);
|
|
1194
|
+
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1195
|
+
})(),
|
|
1196
|
+
/**
|
|
1197
|
+
* Luminance steps
|
|
1198
|
+
*/
|
|
1199
|
+
_a.LuminanceSteps = 6,
|
|
1200
|
+
_a;
|
|
1201
|
+
})();
|
|
1202
|
+
export { StandardRenderingPipeline };
|
|
1141
1203
|
let _Registered = false;
|
|
1142
1204
|
/**
|
|
1143
1205
|
* Parse the serialized pipeline
|