@onerjs/core 8.53.5 → 8.53.7

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.
Files changed (841) hide show
  1. package/Animations/animationGroup.d.ts +0 -1
  2. package/Animations/animationGroup.js +0 -1
  3. package/Animations/animationGroup.js.map +1 -1
  4. package/Animations/animationGroup.pure.js +2 -0
  5. package/Animations/animationGroup.pure.js.map +1 -1
  6. package/Animations/runtimeAnimation.js +11 -0
  7. package/Animations/runtimeAnimation.js.map +1 -1
  8. package/Audio/audioSceneComponent.pure.js +1 -1
  9. package/AudioV2/abstractAudio/abstractSound.d.ts +2 -1
  10. package/AudioV2/abstractAudio/abstractSound.js +7 -2
  11. package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
  12. package/AudioV2/abstractAudio/abstractSoundInstance.d.ts +3 -1
  13. package/AudioV2/abstractAudio/abstractSoundInstance.js.map +1 -1
  14. package/AudioV2/abstractAudio/staticSound.d.ts +6 -0
  15. package/AudioV2/abstractAudio/staticSound.js +17 -1
  16. package/AudioV2/abstractAudio/staticSound.js.map +1 -1
  17. package/AudioV2/abstractAudio/staticSoundInstance.d.ts +4 -2
  18. package/AudioV2/abstractAudio/staticSoundInstance.js.map +1 -1
  19. package/AudioV2/abstractAudio/streamingSound.d.ts +6 -0
  20. package/AudioV2/abstractAudio/streamingSound.js +9 -1
  21. package/AudioV2/abstractAudio/streamingSound.js.map +1 -1
  22. package/AudioV2/webAudio/webAudioStaticSound.d.ts +7 -1
  23. package/AudioV2/webAudio/webAudioStaticSound.js +56 -8
  24. package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
  25. package/AudioV2/webAudio/webAudioStreamingSound.d.ts +3 -1
  26. package/AudioV2/webAudio/webAudioStreamingSound.js +16 -4
  27. package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
  28. package/BakedVertexAnimation/bakedVertexAnimationManager.d.ts +2 -2
  29. package/BakedVertexAnimation/bakedVertexAnimationManager.js +151 -121
  30. package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
  31. package/Behaviors/Cameras/interpolatingBehavior.d.ts +17 -2
  32. package/Behaviors/Cameras/interpolatingBehavior.js +53 -23
  33. package/Behaviors/Cameras/interpolatingBehavior.js.map +1 -1
  34. package/Bones/bone.pure.js +3 -3
  35. package/Buffers/buffer.pure.js +0 -12
  36. package/Buffers/buffer.pure.js.map +1 -1
  37. package/Cameras/Inputs/BaseCameraMouseWheelInput.js +141 -126
  38. package/Cameras/Inputs/BaseCameraMouseWheelInput.js.map +1 -1
  39. package/Cameras/Inputs/BaseCameraPointersInput.d.ts +2 -1
  40. package/Cameras/Inputs/BaseCameraPointersInput.js +290 -277
  41. package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
  42. package/Cameras/Inputs/arcRotateCameraGamepadInput.js +115 -102
  43. package/Cameras/Inputs/arcRotateCameraGamepadInput.js.map +1 -1
  44. package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.d.ts +3 -0
  45. package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js +334 -273
  46. package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js.map +1 -1
  47. package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js +273 -258
  48. package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js.map +1 -1
  49. package/Cameras/Inputs/arcRotateCameraPointersInput.js +237 -213
  50. package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
  51. package/Cameras/Inputs/flyCameraKeyboardInput.js +199 -168
  52. package/Cameras/Inputs/flyCameraKeyboardInput.js.map +1 -1
  53. package/Cameras/Inputs/flyCameraMouseInput.js +243 -229
  54. package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
  55. package/Cameras/Inputs/followCameraKeyboardMoveInput.js +311 -266
  56. package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
  57. package/Cameras/Inputs/followCameraMouseWheelInput.js +139 -119
  58. package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
  59. package/Cameras/Inputs/followCameraPointersInput.js +239 -203
  60. package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
  61. package/Cameras/Inputs/freeCameraGamepadInput.js +127 -114
  62. package/Cameras/Inputs/freeCameraGamepadInput.js.map +1 -1
  63. package/Cameras/Inputs/freeCameraKeyboardMoveInput.js +278 -244
  64. package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
  65. package/Cameras/Inputs/freeCameraMouseInput.js +216 -202
  66. package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
  67. package/Cameras/Inputs/freeCameraMouseWheelInput.js +368 -353
  68. package/Cameras/Inputs/freeCameraMouseWheelInput.js.map +1 -1
  69. package/Cameras/Inputs/freeCameraTouchInput.js +185 -172
  70. package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
  71. package/Cameras/Inputs/geospatialCameraKeyboardInput.d.ts +2 -0
  72. package/Cameras/Inputs/geospatialCameraKeyboardInput.js +291 -246
  73. package/Cameras/Inputs/geospatialCameraKeyboardInput.js.map +1 -1
  74. package/Cameras/Inputs/geospatialCameraPointersInput.d.ts +11 -1
  75. package/Cameras/Inputs/geospatialCameraPointersInput.js +18 -2
  76. package/Cameras/Inputs/geospatialCameraPointersInput.js.map +1 -1
  77. package/Cameras/Inputs/orbitCameraPointersInput.js +112 -96
  78. package/Cameras/Inputs/orbitCameraPointersInput.js.map +1 -1
  79. package/Cameras/VR/vrExperienceHelper.d.ts +0 -2
  80. package/Cameras/VR/vrExperienceHelper.js +0 -2
  81. package/Cameras/VR/vrExperienceHelper.js.map +1 -1
  82. package/Cameras/VR/vrExperienceHelper.pure.js +5 -0
  83. package/Cameras/VR/vrExperienceHelper.pure.js.map +1 -1
  84. package/Cameras/arcRotateCamera.pure.js +1559 -1479
  85. package/Cameras/arcRotateCamera.pure.js.map +1 -1
  86. package/Cameras/camera.pure.js +1225 -1178
  87. package/Cameras/camera.pure.js.map +1 -1
  88. package/Cameras/flyCamera.pure.js +369 -351
  89. package/Cameras/flyCamera.pure.js.map +1 -1
  90. package/Cameras/followCamera.pure.js +229 -192
  91. package/Cameras/followCamera.pure.js.map +1 -1
  92. package/Cameras/freeCamera.pure.js +373 -351
  93. package/Cameras/freeCamera.pure.js.map +1 -1
  94. package/Cameras/geospatialCamera.pure.d.ts +30 -7
  95. package/Cameras/geospatialCamera.pure.js +502 -457
  96. package/Cameras/geospatialCamera.pure.js.map +1 -1
  97. package/Cameras/geospatialCameraMovement.js +2 -2
  98. package/Cameras/geospatialCameraMovement.js.map +1 -1
  99. package/Cameras/targetCamera.pure.d.ts +7 -0
  100. package/Cameras/targetCamera.pure.js +550 -509
  101. package/Cameras/targetCamera.pure.js.map +1 -1
  102. package/Cameras/universalCamera.pure.js +98 -85
  103. package/Cameras/universalCamera.pure.js.map +1 -1
  104. package/Collisions/gpuPicker.d.ts +111 -4
  105. package/Collisions/gpuPicker.js +696 -119
  106. package/Collisions/gpuPicker.js.map +1 -1
  107. package/Compute/computeShader.pure.js +372 -355
  108. package/Compute/computeShader.pure.js.map +1 -1
  109. package/Culling/Helper/transformFeedbackBoundingHelper.pure.js +2 -2
  110. package/Decorators/nodeDecorator.d.ts +11 -1
  111. package/Decorators/nodeDecorator.js +43 -6
  112. package/Decorators/nodeDecorator.js.map +1 -1
  113. package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js +8 -0
  114. package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js.map +1 -1
  115. package/Engines/Native/nativeHelpers.js +15 -0
  116. package/Engines/Native/nativeHelpers.js.map +1 -1
  117. package/Engines/Native/nativeInterfaces.d.ts +7 -2
  118. package/Engines/Native/nativeInterfaces.js.map +1 -1
  119. package/Engines/Native/nativeRenderTargetWrapper.d.ts +5 -0
  120. package/Engines/Native/nativeRenderTargetWrapper.js +35 -1
  121. package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
  122. package/Engines/Processors/shaderProcessor.js +5 -3
  123. package/Engines/Processors/shaderProcessor.js.map +1 -1
  124. package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js +16 -3
  125. package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js.map +1 -1
  126. package/Engines/WebGPU/webgpuClearQuad.pure.js +7 -1
  127. package/Engines/WebGPU/webgpuClearQuad.pure.js.map +1 -1
  128. package/Engines/abstractEngine.functions.d.ts +8 -2
  129. package/Engines/abstractEngine.functions.js +12 -4
  130. package/Engines/abstractEngine.functions.js.map +1 -1
  131. package/Engines/abstractEngine.pure.d.ts +20 -1
  132. package/Engines/abstractEngine.pure.js +21 -134
  133. package/Engines/abstractEngine.pure.js.map +1 -1
  134. package/Engines/engine.d.ts +208 -0
  135. package/Engines/engine.pure.js +0 -15
  136. package/Engines/engine.pure.js.map +1 -1
  137. package/Engines/nullEngine.pure.d.ts +66 -0
  138. package/Engines/nullEngine.pure.js +97 -0
  139. package/Engines/nullEngine.pure.js.map +1 -1
  140. package/Engines/thinEngine.pure.d.ts +0 -13
  141. package/Engines/thinEngine.pure.js +4 -23
  142. package/Engines/thinEngine.pure.js.map +1 -1
  143. package/Engines/thinNativeEngine.d.ts +0 -1
  144. package/Engines/thinNativeEngine.js +0 -1
  145. package/Engines/thinNativeEngine.js.map +1 -1
  146. package/Engines/thinNativeEngine.pure.d.ts +27 -0
  147. package/Engines/thinNativeEngine.pure.js +383 -17
  148. package/Engines/thinNativeEngine.pure.js.map +1 -1
  149. package/Engines/webgpuEngine.d.ts +1 -0
  150. package/Engines/webgpuEngine.js +1 -0
  151. package/Engines/webgpuEngine.js.map +1 -1
  152. package/Engines/webgpuEngine.pure.d.ts +9 -0
  153. package/Engines/webgpuEngine.pure.js +7 -0
  154. package/Engines/webgpuEngine.pure.js.map +1 -1
  155. package/FlowGraph/flowGraph.js +9 -0
  156. package/FlowGraph/flowGraph.js.map +1 -1
  157. package/FlowGraph/flowGraphContext.js +597 -584
  158. package/FlowGraph/flowGraphContext.js.map +1 -1
  159. package/FlowGraph/flowGraphDataConnection.pure.d.ts +14 -0
  160. package/FlowGraph/flowGraphDataConnection.pure.js +38 -1
  161. package/FlowGraph/flowGraphDataConnection.pure.js.map +1 -1
  162. package/FlowGraph/serialization.d.ts +11 -0
  163. package/FlowGraph/serialization.js +11 -1
  164. package/FlowGraph/serialization.js.map +1 -1
  165. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js +182 -170
  166. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js.map +1 -1
  167. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js +196 -184
  168. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js.map +1 -1
  169. package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js +222 -210
  170. package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js.map +1 -1
  171. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +123 -111
  172. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js.map +1 -1
  173. package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js +158 -146
  174. package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js.map +1 -1
  175. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js +63 -51
  176. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js.map +1 -1
  177. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js +122 -110
  178. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js.map +1 -1
  179. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js +76 -64
  180. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js.map +1 -1
  181. package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js +89 -77
  182. package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js.map +1 -1
  183. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js +134 -122
  184. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js.map +1 -1
  185. package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js +58 -46
  186. package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js.map +1 -1
  187. package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js +107 -95
  188. package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js.map +1 -1
  189. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js +181 -169
  190. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js.map +1 -1
  191. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js +63 -51
  192. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js.map +1 -1
  193. package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js +63 -51
  194. package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js.map +1 -1
  195. package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js +76 -64
  196. package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js.map +1 -1
  197. package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js +246 -234
  198. package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js.map +1 -1
  199. package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js +108 -96
  200. package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js.map +1 -1
  201. package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js +87 -75
  202. package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js.map +1 -1
  203. package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js +76 -64
  204. package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js.map +1 -1
  205. package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js +313 -301
  206. package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js.map +1 -1
  207. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js +502 -490
  208. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js.map +1 -1
  209. package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js +147 -135
  210. package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js.map +1 -1
  211. package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js +90 -78
  212. package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js.map +1 -1
  213. package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js +179 -167
  214. package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js.map +1 -1
  215. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +462 -451
  216. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  217. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +265 -253
  218. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js.map +1 -1
  219. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js +204 -192
  220. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js.map +1 -1
  221. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js +611 -550
  222. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js.map +1 -1
  223. package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js +320 -308
  224. package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js.map +1 -1
  225. package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js +87 -75
  226. package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js.map +1 -1
  227. package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js +154 -142
  228. package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js.map +1 -1
  229. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js +150 -138
  230. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js.map +1 -1
  231. package/FrameGraph/Node/Blocks/inputBlock.pure.js +270 -256
  232. package/FrameGraph/Node/Blocks/inputBlock.pure.js.map +1 -1
  233. package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js +95 -83
  234. package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js.map +1 -1
  235. package/FrameGraph/Node/nodeRenderGraph.js +715 -693
  236. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  237. package/FrameGraph/Node/nodeRenderGraphBlock.js +548 -533
  238. package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -1
  239. package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.d.ts +2 -2
  240. package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js +43 -51
  241. package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js.map +1 -1
  242. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.d.ts +0 -1
  243. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js +0 -1
  244. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js.map +1 -1
  245. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.d.ts +0 -1
  246. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js +66 -35
  247. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js.map +1 -1
  248. package/Helpers/environmentHelper.js +2 -2
  249. package/Helpers/environmentHelper.js.map +1 -1
  250. package/Layers/effectLayer.js +529 -519
  251. package/Layers/effectLayer.js.map +1 -1
  252. package/Layers/glowLayer.pure.js +428 -413
  253. package/Layers/glowLayer.pure.js.map +1 -1
  254. package/Layers/highlightLayer.pure.js +473 -458
  255. package/Layers/highlightLayer.pure.js.map +1 -1
  256. package/Layers/selectionOutlineLayer.pure.js +360 -345
  257. package/Layers/selectionOutlineLayer.pure.js.map +1 -1
  258. package/Lights/Clustered/clusteredLightContainer.pure.d.ts +1 -1
  259. package/Lights/Clustered/clusteredLightContainer.pure.js +583 -558
  260. package/Lights/Clustered/clusteredLightContainer.pure.js.map +1 -1
  261. package/Lights/Shadows/shadowGenerator.js +6 -1
  262. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  263. package/Lights/areaLight.pure.js +61 -39
  264. package/Lights/areaLight.pure.js.map +1 -1
  265. package/Lights/directionalLight.pure.js +308 -284
  266. package/Lights/directionalLight.pure.js.map +1 -1
  267. package/Lights/hemisphericLight.pure.js +123 -104
  268. package/Lights/hemisphericLight.pure.js.map +1 -1
  269. package/Lights/light.d.ts +5 -3
  270. package/Lights/light.js +869 -827
  271. package/Lights/light.js.map +1 -1
  272. package/Lights/pointLight.pure.js +185 -174
  273. package/Lights/pointLight.pure.js.map +1 -1
  274. package/Lights/rectAreaLight.pure.d.ts +17 -0
  275. package/Lights/rectAreaLight.pure.js +238 -159
  276. package/Lights/rectAreaLight.pure.js.map +1 -1
  277. package/Lights/shadowLight.js +280 -268
  278. package/Lights/shadowLight.js.map +1 -1
  279. package/Lights/spotLight.pure.js +460 -427
  280. package/Lights/spotLight.pure.js.map +1 -1
  281. package/Loading/Plugins/babylonFileLoader.pure.js +17 -5
  282. package/Loading/Plugins/babylonFileLoader.pure.js.map +1 -1
  283. package/Loading/sceneLoader.d.ts +5 -1
  284. package/Loading/sceneLoader.js +299 -402
  285. package/Loading/sceneLoader.js.map +1 -1
  286. package/Materials/Background/backgroundMaterial.pure.d.ts +18 -18
  287. package/Materials/Background/backgroundMaterial.pure.js +949 -794
  288. package/Materials/Background/backgroundMaterial.pure.js.map +1 -1
  289. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.d.ts +15 -0
  290. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +34 -1
  291. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
  292. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.d.ts +9 -0
  293. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +26 -2
  294. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
  295. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.d.ts +2 -1
  296. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js +169 -149
  297. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js.map +1 -1
  298. package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +1 -1
  299. package/Materials/Node/Blocks/Dual/lightBlock.pure.js +442 -429
  300. package/Materials/Node/Blocks/Dual/lightBlock.pure.js.map +1 -1
  301. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js +396 -383
  302. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js.map +1 -1
  303. package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js +237 -220
  304. package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js.map +1 -1
  305. package/Materials/Node/Blocks/Dual/textureBlock.pure.js +1 -1
  306. package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js +150 -133
  307. package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js.map +1 -1
  308. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js +265 -250
  309. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js.map +1 -1
  310. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js +159 -142
  311. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js.map +1 -1
  312. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js +214 -201
  313. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js.map +1 -1
  314. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js +419 -400
  315. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js.map +1 -1
  316. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js +3 -1
  317. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js.map +1 -1
  318. package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js +302 -289
  319. package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js.map +1 -1
  320. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +1327 -1272
  321. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
  322. package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js +352 -337
  323. package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js.map +1 -1
  324. package/Materials/Node/Blocks/PBR/refractionBlock.pure.js +297 -277
  325. package/Materials/Node/Blocks/PBR/refractionBlock.pure.js.map +1 -1
  326. package/Materials/Node/Blocks/PBR/sheenBlock.pure.js +146 -131
  327. package/Materials/Node/Blocks/PBR/sheenBlock.pure.js.map +1 -1
  328. package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js +158 -145
  329. package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js.map +1 -1
  330. package/Materials/Node/Blocks/clampBlock.pure.js +92 -77
  331. package/Materials/Node/Blocks/clampBlock.pure.js.map +1 -1
  332. package/Materials/Node/Blocks/cloudBlock.pure.js +145 -132
  333. package/Materials/Node/Blocks/cloudBlock.pure.js.map +1 -1
  334. package/Materials/Node/Blocks/conditionalBlock.pure.js +182 -169
  335. package/Materials/Node/Blocks/conditionalBlock.pure.js.map +1 -1
  336. package/Materials/Node/Blocks/curveBlock.pure.js +259 -246
  337. package/Materials/Node/Blocks/curveBlock.pure.js.map +1 -1
  338. package/Materials/Node/Blocks/debugBlock.pure.js +119 -106
  339. package/Materials/Node/Blocks/debugBlock.pure.js.map +1 -1
  340. package/Materials/Node/Blocks/loopBlock.pure.js +123 -110
  341. package/Materials/Node/Blocks/loopBlock.pure.js.map +1 -1
  342. package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js +185 -172
  343. package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js.map +1 -1
  344. package/Materials/Node/Blocks/remapBlock.pure.js +127 -112
  345. package/Materials/Node/Blocks/remapBlock.pure.js.map +1 -1
  346. package/Materials/Node/Blocks/transformBlock.pure.js +196 -185
  347. package/Materials/Node/Blocks/transformBlock.pure.js.map +1 -1
  348. package/Materials/Node/Blocks/triPlanarBlock.pure.js +451 -438
  349. package/Materials/Node/Blocks/triPlanarBlock.pure.js.map +1 -1
  350. package/Materials/Node/Blocks/trigonometryBlock.pure.js +184 -171
  351. package/Materials/Node/Blocks/trigonometryBlock.pure.js.map +1 -1
  352. package/Materials/Node/Blocks/waveBlock.pure.js +97 -84
  353. package/Materials/Node/Blocks/waveBlock.pure.js.map +1 -1
  354. package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js +276 -263
  355. package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js.map +1 -1
  356. package/Materials/Node/nodeMaterial.pure.js +1765 -1737
  357. package/Materials/Node/nodeMaterial.pure.js.map +1 -1
  358. package/Materials/Node/nodeMaterialBuildState.d.ts +3 -3
  359. package/Materials/PBR/openpbrMaterial.pure.d.ts +102 -102
  360. package/Materials/PBR/openpbrMaterial.pure.js +3115 -2243
  361. package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
  362. package/Materials/PBR/pbrAnisotropicConfiguration.d.ts +3 -3
  363. package/Materials/PBR/pbrAnisotropicConfiguration.js +255 -227
  364. package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
  365. package/Materials/PBR/pbrBRDFConfiguration.d.ts +9 -9
  366. package/Materials/PBR/pbrBRDFConfiguration.js +203 -155
  367. package/Materials/PBR/pbrBRDFConfiguration.js.map +1 -1
  368. package/Materials/PBR/pbrBaseMaterial.pure.d.ts +1 -1
  369. package/Materials/PBR/pbrBaseMaterial.pure.js +1751 -1736
  370. package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
  371. package/Materials/PBR/pbrBaseSimpleMaterial.d.ts +13 -13
  372. package/Materials/PBR/pbrBaseSimpleMaterial.js +205 -117
  373. package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
  374. package/Materials/PBR/pbrClearCoatConfiguration.d.ts +9 -9
  375. package/Materials/PBR/pbrClearCoatConfiguration.js +464 -406
  376. package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
  377. package/Materials/PBR/pbrIridescenceConfiguration.d.ts +3 -3
  378. package/Materials/PBR/pbrIridescenceConfiguration.js +271 -239
  379. package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
  380. package/Materials/PBR/pbrMaterial.pure.d.ts +66 -66
  381. package/Materials/PBR/pbrMaterial.pure.js +1041 -685
  382. package/Materials/PBR/pbrMaterial.pure.js.map +1 -1
  383. package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.d.ts +5 -5
  384. package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js +176 -115
  385. package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js.map +1 -1
  386. package/Materials/PBR/pbrSheenConfiguration.d.ts +7 -7
  387. package/Materials/PBR/pbrSheenConfiguration.js +314 -270
  388. package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
  389. package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.d.ts +5 -5
  390. package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js +172 -117
  391. package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js.map +1 -1
  392. package/Materials/PBR/pbrSubSurfaceConfiguration.d.ts +16 -16
  393. package/Materials/PBR/pbrSubSurfaceConfiguration.js +864 -764
  394. package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
  395. package/Materials/Textures/HTML/htmlInCanvasPolyfill.d.ts +43 -0
  396. package/Materials/Textures/HTML/htmlInCanvasPolyfill.js +64 -0
  397. package/Materials/Textures/HTML/htmlInCanvasPolyfill.js.map +1 -0
  398. package/Materials/Textures/HTML/htmlInteractionManager.d.ts +69 -0
  399. package/Materials/Textures/HTML/htmlInteractionManager.js +130 -0
  400. package/Materials/Textures/HTML/htmlInteractionManager.js.map +1 -0
  401. package/Materials/Textures/HTML/htmlRaycastInteractionManager.d.ts +84 -0
  402. package/Materials/Textures/HTML/htmlRaycastInteractionManager.js +246 -0
  403. package/Materials/Textures/HTML/htmlRaycastInteractionManager.js.map +1 -0
  404. package/Materials/Textures/HTML/htmlTexture.d.ts +148 -0
  405. package/Materials/Textures/HTML/htmlTexture.js +455 -0
  406. package/Materials/Textures/HTML/htmlTexture.js.map +1 -0
  407. package/Materials/Textures/HTML/index.d.ts +4 -0
  408. package/Materials/Textures/HTML/index.js +5 -0
  409. package/Materials/Textures/HTML/index.js.map +1 -0
  410. package/Materials/Textures/HTML/pure.d.ts +5 -0
  411. package/Materials/Textures/HTML/pure.js +6 -0
  412. package/Materials/Textures/HTML/pure.js.map +1 -0
  413. package/Materials/Textures/Procedurals/proceduralTexture.pure.js +671 -643
  414. package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
  415. package/Materials/Textures/baseTexture.pure.js +880 -825
  416. package/Materials/Textures/baseTexture.pure.js.map +1 -1
  417. package/Materials/Textures/cubeTexture.d.ts +0 -1
  418. package/Materials/Textures/cubeTexture.js +0 -1
  419. package/Materials/Textures/cubeTexture.js.map +1 -1
  420. package/Materials/Textures/cubeTexture.pure.js +368 -333
  421. package/Materials/Textures/cubeTexture.pure.js.map +1 -1
  422. package/Materials/Textures/dynamicTexture.d.ts +0 -1
  423. package/Materials/Textures/dynamicTexture.js +0 -1
  424. package/Materials/Textures/dynamicTexture.js.map +1 -1
  425. package/Materials/Textures/dynamicTexture.pure.js +2 -0
  426. package/Materials/Textures/dynamicTexture.pure.js.map +1 -1
  427. package/Materials/Textures/htmlElementTexture.d.ts +0 -2
  428. package/Materials/Textures/htmlElementTexture.js +0 -2
  429. package/Materials/Textures/htmlElementTexture.js.map +1 -1
  430. package/Materials/Textures/htmlElementTexture.pure.js +4 -0
  431. package/Materials/Textures/htmlElementTexture.pure.js.map +1 -1
  432. package/Materials/Textures/index.d.ts +1 -0
  433. package/Materials/Textures/index.js +1 -1
  434. package/Materials/Textures/index.js.map +1 -1
  435. package/Materials/Textures/multiRenderTarget.d.ts +0 -1
  436. package/Materials/Textures/multiRenderTarget.js +0 -1
  437. package/Materials/Textures/multiRenderTarget.js.map +1 -1
  438. package/Materials/Textures/multiRenderTarget.pure.js +2 -0
  439. package/Materials/Textures/multiRenderTarget.pure.js.map +1 -1
  440. package/Materials/Textures/pure.d.ts +1 -0
  441. package/Materials/Textures/pure.js +1 -0
  442. package/Materials/Textures/pure.js.map +1 -1
  443. package/Materials/Textures/texture.pure.js +961 -923
  444. package/Materials/Textures/texture.pure.js.map +1 -1
  445. package/Materials/Textures/videoTexture.pure.d.ts +3 -0
  446. package/Materials/Textures/videoTexture.pure.js +450 -401
  447. package/Materials/Textures/videoTexture.pure.js.map +1 -1
  448. package/Materials/colorCurves.pure.js +510 -477
  449. package/Materials/colorCurves.pure.js.map +1 -1
  450. package/Materials/effect.pure.js +0 -7
  451. package/Materials/effect.pure.js.map +1 -1
  452. package/Materials/imageProcessing.js +12 -4
  453. package/Materials/imageProcessing.js.map +1 -1
  454. package/Materials/imageProcessingConfiguration.pure.js +647 -587
  455. package/Materials/imageProcessingConfiguration.pure.js.map +1 -1
  456. package/Materials/material.decalMapConfiguration.pure.d.ts +2 -2
  457. package/Materials/material.decalMapConfiguration.pure.js +149 -130
  458. package/Materials/material.decalMapConfiguration.pure.js.map +1 -1
  459. package/Materials/material.detailMapConfiguration.d.ts +3 -3
  460. package/Materials/material.detailMapConfiguration.js +213 -175
  461. package/Materials/material.detailMapConfiguration.js.map +1 -1
  462. package/Materials/material.pure.js +1815 -1721
  463. package/Materials/material.pure.js.map +1 -1
  464. package/Materials/materialPluginBase.pure.js +270 -249
  465. package/Materials/materialPluginBase.pure.js.map +1 -1
  466. package/Materials/materialPluginManager.pure.js +18 -8
  467. package/Materials/materialPluginManager.pure.js.map +1 -1
  468. package/Materials/materialStencilState.js +211 -200
  469. package/Materials/materialStencilState.js.map +1 -1
  470. package/Materials/meshDebugPluginMaterial.pure.d.ts +2 -2
  471. package/Materials/meshDebugPluginMaterial.pure.js +397 -275
  472. package/Materials/meshDebugPluginMaterial.pure.js.map +1 -1
  473. package/Materials/standardMaterial.pure.d.ts +32 -32
  474. package/Materials/standardMaterial.pure.js +1804 -1394
  475. package/Materials/standardMaterial.pure.js.map +1 -1
  476. package/Maths/math.color.pure.js +5 -5
  477. package/Maths/math.functions.js +38 -30
  478. package/Maths/math.functions.js.map +1 -1
  479. package/Maths/math.vector.pure.js +25 -25
  480. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +18 -8
  481. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
  482. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +86 -1
  483. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +255 -104
  484. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
  485. package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.d.ts +39 -0
  486. package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js +322 -0
  487. package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js.map +1 -0
  488. package/Meshes/GreasedLine/greasedLineMesh.pure.js +4 -4
  489. package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +3 -3
  490. package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js +107 -94
  491. package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js.map +1 -1
  492. package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js +276 -263
  493. package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js.map +1 -1
  494. package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js +247 -232
  495. package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js.map +1 -1
  496. package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js +299 -284
  497. package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js.map +1 -1
  498. package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js +196 -181
  499. package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js.map +1 -1
  500. package/Meshes/Node/Blocks/Set/latticeBlock.pure.js +198 -179
  501. package/Meshes/Node/Blocks/Set/latticeBlock.pure.js.map +1 -1
  502. package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js +151 -138
  503. package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js.map +1 -1
  504. package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js +107 -94
  505. package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js.map +1 -1
  506. package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js +138 -125
  507. package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js.map +1 -1
  508. package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js +213 -200
  509. package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js.map +1 -1
  510. package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js +138 -125
  511. package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js.map +1 -1
  512. package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js +179 -164
  513. package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js.map +1 -1
  514. package/Meshes/Node/Blocks/Sources/boxBlock.pure.js +183 -170
  515. package/Meshes/Node/Blocks/Sources/boxBlock.pure.js.map +1 -1
  516. package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js +125 -112
  517. package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js.map +1 -1
  518. package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js +153 -140
  519. package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js.map +1 -1
  520. package/Meshes/Node/Blocks/Sources/discBlock.pure.js +112 -99
  521. package/Meshes/Node/Blocks/Sources/discBlock.pure.js.map +1 -1
  522. package/Meshes/Node/Blocks/Sources/gridBlock.pure.js +133 -120
  523. package/Meshes/Node/Blocks/Sources/gridBlock.pure.js.map +1 -1
  524. package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js +128 -115
  525. package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js.map +1 -1
  526. package/Meshes/Node/Blocks/Sources/meshBlock.pure.js +116 -103
  527. package/Meshes/Node/Blocks/Sources/meshBlock.pure.js.map +1 -1
  528. package/Meshes/Node/Blocks/Sources/planeBlock.pure.js +160 -147
  529. package/Meshes/Node/Blocks/Sources/planeBlock.pure.js.map +1 -1
  530. package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js +144 -131
  531. package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js.map +1 -1
  532. package/Meshes/Node/Blocks/Sources/torusBlock.pure.js +112 -99
  533. package/Meshes/Node/Blocks/Sources/torusBlock.pure.js.map +1 -1
  534. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js +200 -185
  535. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js.map +1 -1
  536. package/Meshes/Node/Blocks/bevelBlock.pure.js +111 -98
  537. package/Meshes/Node/Blocks/bevelBlock.pure.js.map +1 -1
  538. package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +182 -165
  539. package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
  540. package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js +89 -76
  541. package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js.map +1 -1
  542. package/Meshes/Node/Blocks/conditionBlock.pure.js +184 -169
  543. package/Meshes/Node/Blocks/conditionBlock.pure.js.map +1 -1
  544. package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js +270 -255
  545. package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js.map +1 -1
  546. package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js +172 -159
  547. package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js.map +1 -1
  548. package/Meshes/Node/Blocks/geometryCurveBlock.pure.js +230 -217
  549. package/Meshes/Node/Blocks/geometryCurveBlock.pure.js.map +1 -1
  550. package/Meshes/Node/Blocks/geometryEaseBlock.pure.js +256 -245
  551. package/Meshes/Node/Blocks/geometryEaseBlock.pure.js.map +1 -1
  552. package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js +206 -189
  553. package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js.map +1 -1
  554. package/Meshes/Node/Blocks/geometryTransformBlock.pure.js +166 -153
  555. package/Meshes/Node/Blocks/geometryTransformBlock.pure.js.map +1 -1
  556. package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js +221 -208
  557. package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js.map +1 -1
  558. package/Meshes/Node/Blocks/mappingBlock.pure.js +150 -137
  559. package/Meshes/Node/Blocks/mappingBlock.pure.js.map +1 -1
  560. package/Meshes/Node/Blocks/mathBlock.pure.js +269 -256
  561. package/Meshes/Node/Blocks/mathBlock.pure.js.map +1 -1
  562. package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js +141 -128
  563. package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js.map +1 -1
  564. package/Meshes/Node/Blocks/randomBlock.pure.js +161 -148
  565. package/Meshes/Node/Blocks/randomBlock.pure.js.map +1 -1
  566. package/Meshes/Node/Blocks/subdivideBlock.pure.js +102 -87
  567. package/Meshes/Node/Blocks/subdivideBlock.pure.js.map +1 -1
  568. package/Meshes/Node/nodeGeometry.js +560 -538
  569. package/Meshes/Node/nodeGeometry.js.map +1 -1
  570. package/Meshes/Node/nodeGeometryBlock.js +473 -458
  571. package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
  572. package/Meshes/abstractMesh.pure.js +2218 -2207
  573. package/Meshes/abstractMesh.pure.js.map +1 -1
  574. package/Meshes/geometry.js +30 -15
  575. package/Meshes/geometry.js.map +1 -1
  576. package/Meshes/mesh.pure.js +26 -14
  577. package/Meshes/mesh.pure.js.map +1 -1
  578. package/Meshes/mesh.vertexData.js +1665 -1655
  579. package/Meshes/mesh.vertexData.js.map +1 -1
  580. package/Meshes/transformNode.pure.js +1400 -1372
  581. package/Meshes/transformNode.pure.js.map +1 -1
  582. package/Misc/decorators.d.ts +34 -19
  583. package/Misc/decorators.functions.d.ts +33 -2
  584. package/Misc/decorators.functions.js +114 -35
  585. package/Misc/decorators.functions.js.map +1 -1
  586. package/Misc/decorators.js +96 -68
  587. package/Misc/decorators.js.map +1 -1
  588. package/Misc/decorators.serialization.js +47 -40
  589. package/Misc/decorators.serialization.js.map +1 -1
  590. package/Misc/decorators.serializationUtilities.d.ts +24 -0
  591. package/Misc/decorators.serializationUtilities.js +20 -0
  592. package/Misc/decorators.serializationUtilities.js.map +1 -0
  593. package/Misc/dumpTools.pure.js +43 -33
  594. package/Misc/dumpTools.pure.js.map +1 -1
  595. package/Misc/fileTools.pure.js +8 -0
  596. package/Misc/fileTools.pure.js.map +1 -1
  597. package/Misc/observable.pure.js +0 -7
  598. package/Misc/observable.pure.js.map +1 -1
  599. package/Misc/snapshotRenderingHelper.d.ts +4 -1
  600. package/Misc/snapshotRenderingHelper.js.map +1 -1
  601. package/Misc/symbolMetadataPolyfill.d.ts +11 -0
  602. package/Misc/symbolMetadataPolyfill.js +22 -0
  603. package/Misc/symbolMetadataPolyfill.js.map +1 -0
  604. package/Misc/tools.pure.js +2 -2
  605. package/Misc/tools.pure.js.map +1 -1
  606. package/Morph/morphTarget.js +382 -365
  607. package/Morph/morphTarget.js.map +1 -1
  608. package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js +160 -145
  609. package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js.map +1 -1
  610. package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js +187 -174
  611. package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js.map +1 -1
  612. package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js +238 -219
  613. package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js.map +1 -1
  614. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js +140 -115
  615. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js.map +1 -1
  616. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js +157 -144
  617. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js.map +1 -1
  618. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js +133 -119
  619. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js.map +1 -1
  620. package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js +93 -80
  621. package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js.map +1 -1
  622. package/Particles/Node/Blocks/particleDebugBlock.pure.js +117 -105
  623. package/Particles/Node/Blocks/particleDebugBlock.pure.js.map +1 -1
  624. package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js +105 -92
  625. package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js.map +1 -1
  626. package/Particles/Node/Blocks/particleGradientValueBlock.pure.js +82 -69
  627. package/Particles/Node/Blocks/particleGradientValueBlock.pure.js.map +1 -1
  628. package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js +113 -101
  629. package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js.map +1 -1
  630. package/Particles/Node/Blocks/particleMathBlock.pure.js +278 -265
  631. package/Particles/Node/Blocks/particleMathBlock.pure.js.map +1 -1
  632. package/Particles/Node/Blocks/particleNumberMathBlock.pure.js +155 -142
  633. package/Particles/Node/Blocks/particleNumberMathBlock.pure.js.map +1 -1
  634. package/Particles/Node/Blocks/particleRandomBlock.pure.js +156 -143
  635. package/Particles/Node/Blocks/particleRandomBlock.pure.js.map +1 -1
  636. package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js +217 -204
  637. package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js.map +1 -1
  638. package/Particles/Node/Blocks/particleVectorMathBlock.pure.js +106 -93
  639. package/Particles/Node/Blocks/particleVectorMathBlock.pure.js.map +1 -1
  640. package/Particles/Node/Blocks/systemBlock.pure.js +366 -330
  641. package/Particles/Node/Blocks/systemBlock.pure.js.map +1 -1
  642. package/Particles/Node/nodeParticleBlock.js +339 -324
  643. package/Particles/Node/nodeParticleBlock.js.map +1 -1
  644. package/Particles/Node/nodeParticleSystemSet.js +494 -473
  645. package/Particles/Node/nodeParticleSystemSet.js.map +1 -1
  646. package/Particles/gpuParticleSystem.d.ts +0 -1
  647. package/Particles/gpuParticleSystem.js +0 -1
  648. package/Particles/gpuParticleSystem.js.map +1 -1
  649. package/Particles/gpuParticleSystem.pure.d.ts +4 -3
  650. package/Particles/gpuParticleSystem.pure.js +27 -16
  651. package/Particles/gpuParticleSystem.pure.js.map +1 -1
  652. package/Particles/particleSystem.pure.js +57 -2
  653. package/Particles/particleSystem.pure.js.map +1 -1
  654. package/Particles/thinParticleSystem.d.ts +0 -1
  655. package/Particles/thinParticleSystem.js +0 -1
  656. package/Particles/thinParticleSystem.js.map +1 -1
  657. package/Particles/thinParticleSystem.pure.js +2 -0
  658. package/Particles/thinParticleSystem.pure.js.map +1 -1
  659. package/Particles/webgl2ParticleSystem.pure.js +2 -0
  660. package/Particles/webgl2ParticleSystem.pure.js.map +1 -1
  661. package/Physics/v1/physicsImpostor.pure.js +4 -4
  662. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js +675 -656
  663. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js.map +1 -1
  664. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.d.ts +0 -1
  665. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js +0 -1
  666. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js.map +1 -1
  667. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js +521 -486
  668. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js.map +1 -1
  669. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.d.ts +0 -1
  670. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +0 -1
  671. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
  672. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js +241 -220
  673. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js.map +1 -1
  674. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js +852 -835
  675. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js.map +1 -1
  676. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js +1135 -1073
  677. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js.map +1 -1
  678. package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js +319 -303
  679. package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js.map +1 -1
  680. package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js +212 -199
  681. package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
  682. package/PostProcesses/blackAndWhitePostProcess.pure.js +67 -55
  683. package/PostProcesses/blackAndWhitePostProcess.pure.js.map +1 -1
  684. package/PostProcesses/bloomMergePostProcess.pure.js +74 -62
  685. package/PostProcesses/bloomMergePostProcess.pure.js.map +1 -1
  686. package/PostProcesses/blurPostProcess.pure.js +127 -115
  687. package/PostProcesses/blurPostProcess.pure.js.map +1 -1
  688. package/PostProcesses/chromaticAberrationPostProcess.pure.js +130 -118
  689. package/PostProcesses/chromaticAberrationPostProcess.pure.js.map +1 -1
  690. package/PostProcesses/circleOfConfusionPostProcess.pure.js +115 -104
  691. package/PostProcesses/circleOfConfusionPostProcess.pure.js.map +1 -1
  692. package/PostProcesses/colorCorrectionPostProcess.pure.js +55 -43
  693. package/PostProcesses/colorCorrectionPostProcess.pure.js.map +1 -1
  694. package/PostProcesses/convolutionPostProcess.pure.js +96 -84
  695. package/PostProcesses/convolutionPostProcess.pure.js.map +1 -1
  696. package/PostProcesses/extractHighlightsPostProcess.pure.js +68 -57
  697. package/PostProcesses/extractHighlightsPostProcess.pure.js.map +1 -1
  698. package/PostProcesses/filterPostProcess.pure.js +66 -54
  699. package/PostProcesses/filterPostProcess.pure.js.map +1 -1
  700. package/PostProcesses/fxaaPostProcess.pure.js.map +1 -1
  701. package/PostProcesses/grainPostProcess.pure.js +82 -70
  702. package/PostProcesses/grainPostProcess.pure.js.map +1 -1
  703. package/PostProcesses/imageProcessingPostProcess.js +334 -322
  704. package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
  705. package/PostProcesses/motionBlurPostProcess.pure.js +246 -235
  706. package/PostProcesses/motionBlurPostProcess.pure.js.map +1 -1
  707. package/PostProcesses/passPostProcess.pure.js +75 -63
  708. package/PostProcesses/passPostProcess.pure.js.map +1 -1
  709. package/PostProcesses/postProcess.pure.js +899 -835
  710. package/PostProcesses/postProcess.pure.js.map +1 -1
  711. package/PostProcesses/refractionPostProcess.pure.js +114 -87
  712. package/PostProcesses/refractionPostProcess.pure.js.map +1 -1
  713. package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js +108 -96
  714. package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js.map +1 -1
  715. package/PostProcesses/screenSpaceReflectionPostProcess.pure.js +241 -220
  716. package/PostProcesses/screenSpaceReflectionPostProcess.pure.js.map +1 -1
  717. package/PostProcesses/sharpenPostProcess.pure.js +86 -74
  718. package/PostProcesses/sharpenPostProcess.pure.js.map +1 -1
  719. package/PostProcesses/tonemapPostProcess.pure.js +82 -70
  720. package/PostProcesses/tonemapPostProcess.pure.js.map +1 -1
  721. package/PostProcesses/volumetricLightScatteringPostProcess.pure.js +500 -465
  722. package/PostProcesses/volumetricLightScatteringPostProcess.pure.js.map +1 -1
  723. package/PostProcesses/vrMultiviewToSingleviewPostProcess.d.ts +0 -1
  724. package/PostProcesses/vrMultiviewToSingleviewPostProcess.js +0 -1
  725. package/PostProcesses/vrMultiviewToSingleviewPostProcess.js.map +1 -1
  726. package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js +2 -0
  727. package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js.map +1 -1
  728. package/Probes/reflectionProbe.pure.js +238 -224
  729. package/Probes/reflectionProbe.pure.js.map +1 -1
  730. package/Rendering/GlobalIllumination/giRSMManager.pure.d.ts +1 -1
  731. package/Rendering/GlobalIllumination/giRSMManager.pure.js +138 -105
  732. package/Rendering/GlobalIllumination/giRSMManager.pure.js.map +1 -1
  733. package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.d.ts +1 -1
  734. package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js +155 -138
  735. package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js.map +1 -1
  736. package/Rendering/IBLShadows/iblShadowsRenderPipeline.d.ts +0 -2
  737. package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +0 -2
  738. package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
  739. package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +5 -0
  740. package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
  741. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.d.ts +0 -1
  742. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +0 -1
  743. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
  744. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +1 -0
  745. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +34 -0
  746. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
  747. package/Rendering/edgesRenderer.pure.js.map +1 -1
  748. package/Rendering/prePassRenderer.d.ts +0 -2
  749. package/Rendering/prePassRenderer.js +0 -2
  750. package/Rendering/prePassRenderer.js.map +1 -1
  751. package/Rendering/prePassRenderer.pure.js +2 -0
  752. package/Rendering/prePassRenderer.pure.js.map +1 -1
  753. package/Rendering/reflectiveShadowMap.pure.d.ts +1 -1
  754. package/Rendering/reflectiveShadowMap.pure.js +151 -130
  755. package/Rendering/reflectiveShadowMap.pure.js.map +1 -1
  756. package/Rendering/thinDepthPeelingRenderer.d.ts +0 -1
  757. package/Rendering/thinDepthPeelingRenderer.js +0 -1
  758. package/Rendering/thinDepthPeelingRenderer.js.map +1 -1
  759. package/Shaders/ShadersInclude/gaussianSplatting.js +1 -0
  760. package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
  761. package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +35 -5
  762. package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
  763. package/Shaders/gaussianSplatting.fragment.js +17 -1
  764. package/Shaders/gaussianSplatting.fragment.js.map +1 -1
  765. package/Shaders/gaussianSplatting.vertex.js +1 -1
  766. package/Shaders/gaussianSplatting.vertex.js.map +1 -1
  767. package/Shaders/gaussianSplattingDepth.vertex.js +1 -1
  768. package/Shaders/gaussianSplattingDepth.vertex.js.map +1 -1
  769. package/Shaders/picking.fragment.js +39 -3
  770. package/Shaders/picking.fragment.js.map +1 -1
  771. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +3 -1
  772. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
  773. package/ShadersWGSL/ShadersInclude/helperFunctions.js +2 -2
  774. package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
  775. package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +39 -7
  776. package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
  777. package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +4 -3
  778. package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -1
  779. package/ShadersWGSL/gaussianSplatting.fragment.js +14 -1
  780. package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -1
  781. package/ShadersWGSL/gaussianSplatting.vertex.js +2 -2
  782. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  783. package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -2
  784. package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
  785. package/ShadersWGSL/lightingVolume.compute.js +2 -2
  786. package/ShadersWGSL/lightingVolume.compute.js.map +1 -1
  787. package/ShadersWGSL/picking.fragment.js +22 -1
  788. package/ShadersWGSL/picking.fragment.js.map +1 -1
  789. package/XR/features/Layers/WebXRCompositionLayer.d.ts +3 -2
  790. package/XR/features/Layers/WebXRCompositionLayer.js +2 -2
  791. package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -1
  792. package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +59 -0
  793. package/XR/features/Layers/WebXRWebGPUCompositionLayer.js +120 -0
  794. package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -0
  795. package/XR/features/Layers/WebXRWebGPUProjectionLayer.d.ts +25 -0
  796. package/XR/features/Layers/WebXRWebGPUProjectionLayer.js +69 -0
  797. package/XR/features/Layers/WebXRWebGPUProjectionLayer.js.map +1 -0
  798. package/XR/features/WebXRLayers.pure.d.ts +8 -0
  799. package/XR/features/WebXRLayers.pure.js +43 -6
  800. package/XR/features/WebXRLayers.pure.js.map +1 -1
  801. package/XR/native/nativeXRRenderTarget.d.ts +2 -2
  802. package/XR/native/nativeXRRenderTarget.js +2 -2
  803. package/XR/native/nativeXRRenderTarget.js.map +1 -1
  804. package/XR/webXRExperienceHelper.js +10 -1
  805. package/XR/webXRExperienceHelper.js.map +1 -1
  806. package/XR/webXRGraphicsBinding.d.ts +90 -0
  807. package/XR/webXRGraphicsBinding.js +85 -0
  808. package/XR/webXRGraphicsBinding.js.map +1 -0
  809. package/XR/webXRLayerRenderTargetTexture.d.ts +24 -0
  810. package/XR/webXRLayerRenderTargetTexture.js +30 -0
  811. package/XR/webXRLayerRenderTargetTexture.js.map +1 -0
  812. package/XR/webXRManagedOutputCanvas.d.ts +14 -0
  813. package/XR/webXRManagedOutputCanvas.js +24 -5
  814. package/XR/webXRManagedOutputCanvas.js.map +1 -1
  815. package/XR/webXRRenderTargetTextureProvider.d.ts +25 -4
  816. package/XR/webXRRenderTargetTextureProvider.js +33 -35
  817. package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
  818. package/XR/webXRSessionManager.d.ts +11 -0
  819. package/XR/webXRSessionManager.js +37 -0
  820. package/XR/webXRSessionManager.js.map +1 -1
  821. package/XR/webXRTypes.d.ts +9 -6
  822. package/XR/webXRTypes.js.map +1 -1
  823. package/XR/webXRWebGLLayer.d.ts +2 -2
  824. package/XR/webXRWebGLLayer.js +2 -2
  825. package/XR/webXRWebGLLayer.js.map +1 -1
  826. package/XR/webXRWebGLRenderTargetTextureProvider.d.ts +12 -0
  827. package/XR/webXRWebGLRenderTargetTextureProvider.js +58 -0
  828. package/XR/webXRWebGLRenderTargetTextureProvider.js.map +1 -0
  829. package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +69 -0
  830. package/XR/webXRWebGPURenderTargetTextureProvider.js +148 -0
  831. package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -0
  832. package/index.d.ts +1 -0
  833. package/index.js +1 -0
  834. package/index.js.map +1 -1
  835. package/node.js +878 -845
  836. package/node.js.map +1 -1
  837. package/package.json +8 -14
  838. package/scene.pure.d.ts +12 -0
  839. package/scene.pure.js +36 -0
  840. package/scene.pure.js.map +1 -1
  841. package/tslib.es6.js +304 -150
@@ -1,5 +1,5 @@
1
1
  /** This file must only contain pure code and pure imports */
2
- import { __decorate } from "../../../tslib.es6.js";
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
- export class StandardRenderingPipeline extends PostProcessRenderPipeline {
27
- /**
28
- * Gets the overall exposure used by the pipeline
29
- */
30
- get exposure() {
31
- return this._fixedExposure;
32
- }
33
- /**
34
- * Sets the overall exposure used by the pipeline
35
- */
36
- set exposure(value) {
37
- this._fixedExposure = value;
38
- this._currentExposure = value;
39
- }
40
- /**
41
- * Gets whether or not the exposure of the overall pipeline should be automatically adjusted by the HDR post-process
42
- */
43
- get hdrAutoExposure() {
44
- return this._hdrAutoExposure;
45
- }
46
- /**
47
- * Sets whether or not the exposure of the overall pipeline should be automatically adjusted by the HDR post-process
48
- */
49
- set hdrAutoExposure(value) {
50
- this._hdrAutoExposure = value;
51
- if (this.hdrPostProcess) {
52
- const defines = ["#define HDR"];
53
- if (value) {
54
- defines.push("#define AUTO_EXPOSURE");
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
- this.hdrPostProcess.updateEffect(defines.join("\n"));
57
- }
58
- }
59
- /**
60
- * Gets how much the image is blurred by the movement while using the motion blur post-process
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
- this._vlsEnabled = enabled;
165
- this._buildPipeline();
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
- else {
233
- this.motionBlurPostProcess.updateEffect("#define MOTION_BLUR\n#define MAX_MOTION_SAMPLES " + samples.toFixed(1));
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
- this._motionBlurSamples = samples;
237
- }
238
- /**
239
- * Specifies MSAA sample count, setting this to 4 will provide 4x anti aliasing. (default: 1)
240
- */
241
- get samples() {
242
- return this._samples;
243
- }
244
- set samples(sampleCount) {
245
- if (this._samples === sampleCount) {
246
- return;
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
- effect.setArray2("dsOffsets", downSampleX4Offsets);
593
- };
594
- // Add to pipeline
595
- this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRDownSampleX4", () => {
596
- return this.downSampleX4PostProcess;
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
- this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRVLS", () => {
682
- return this.volumetricLightPostProcess;
683
- }, true));
684
- // Smooth
685
- this._createBlurPostProcesses(scene, ratio / 4, 0, "volumetricLightBlurScale");
686
- // Merge
687
- this.volumetricLightMergePostProces = new PostProcess("HDRVLSMerge", "standard", [], ["originalSampler"], ratio, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, "#define VLSMERGE");
688
- this.volumetricLightMergePostProces.onApply = (effect) => {
689
- effect.setTextureFromPostProcess("originalSampler", this._bloomEnabled ? this.textureAdderFinalPostProcess : this.originalPostProcess);
690
- this._currentDepthOfFieldSource = this.volumetricLightFinalPostProcess;
691
- };
692
- this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRVLSMerge", () => {
693
- return this.volumetricLightMergePostProces;
694
- }, true));
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
- const postProcess = new PostProcess("HDRLuminanceDownSample" + i, "standard", ["dsOffsets", "halfDestPixelSize"], [], { width: size, height: size }, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, defines, textureType);
727
- this.luminanceDownSamplePostProcesses.push(postProcess);
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
- let id = 0;
739
- for (let x = -1; x < 2; x++) {
740
- for (let y = -1; y < 2; y++) {
741
- downSampleOffsets[id] = x / lastLuminance.width;
742
- downSampleOffsets[id + 1] = y / lastLuminance.height;
743
- id += 2;
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
- effect.setArray2("dsOffsets", downSampleOffsets);
747
- effect.setFloat("halfDestPixelSize", 0.5 / lastLuminance.width);
748
- if (index === this.luminanceDownSamplePostProcesses.length - 1) {
749
- lastLuminance = this.luminancePostProcess;
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
- else {
752
- lastLuminance = pp;
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
- if (index === this.luminanceDownSamplePostProcesses.length - 1) {
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
- this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDRLuminanceDownSample" + index, () => {
767
- return pp;
768
- }, true));
769
- }
770
- }
771
- // Create HDR post-process
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
- else {
788
- const dt = (lastTime - time) / 1000.0;
789
- if (this._hdrCurrentLuminance < outputLiminance + this.hdrDecreaseRate * dt) {
790
- outputLiminance += this.hdrDecreaseRate * dt;
235
+ set VLSEnabled(enabled) {
236
+ if (this._vlsEnabled === enabled) {
237
+ return;
791
238
  }
792
- else if (this._hdrCurrentLuminance > outputLiminance - this.hdrIncreaseRate * dt) {
793
- outputLiminance -= this.hdrIncreaseRate * dt;
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
- else {
796
- outputLiminance = this._hdrCurrentLuminance;
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
- if (this.hdrAutoExposure) {
800
- this._currentExposure = this._fixedExposure / outputLiminance;
263
+ /**
264
+ * Specifies if anti-aliasing is enabled
265
+ */
266
+ get fxaaEnabled() {
267
+ return this._fxaaEnabled;
801
268
  }
802
- else {
803
- outputLiminance = Clamp(outputLiminance, this.hdrMinimumLuminance, 1e20);
804
- effect.setFloat("averageLuminance", outputLiminance);
269
+ set fxaaEnabled(enabled) {
270
+ if (this._fxaaEnabled === enabled) {
271
+ return;
272
+ }
273
+ this._fxaaEnabled = enabled;
274
+ this._buildPipeline();
805
275
  }
806
- lastTime = time;
807
- this._currentDepthOfFieldSource = this.hdrFinalPostProcess;
808
- };
809
- this.addEffect(new PostProcessRenderEffect(scene.getEngine(), "HDR", () => {
810
- return this.hdrPostProcess;
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
- effect.setTextureFromPostProcess("otherSampler", this.lensFlarePostProcess);
847
- effect.setTexture("lensDirtSampler", this.lensFlareDirtTexture);
848
- effect.setTexture("lensStarSampler", this.lensStarTexture);
849
- // Lens start rotation matrix
850
- const camerax = this._scene.activeCamera.getViewMatrix().getRow(0);
851
- const cameraz = this._scene.activeCamera.getViewMatrix().getRow(2);
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
- if (this.screenSpaceReflectionPostProcess) {
921
- this.screenSpaceReflectionPostProcess.dispose(camera);
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
- if (this.downSampleX4PostProcess) {
924
- this.downSampleX4PostProcess.dispose(camera);
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
- if (this.brightPassPostProcess) {
927
- this.brightPassPostProcess.dispose(camera);
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
- if (this.textureAdderPostProcess) {
930
- this.textureAdderPostProcess.dispose(camera);
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
- if (this.volumetricLightPostProcess) {
933
- this.volumetricLightPostProcess.dispose(camera);
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
- if (this.volumetricLightSmoothXPostProcess) {
936
- this.volumetricLightSmoothXPostProcess.dispose(camera);
326
+ set samples(sampleCount) {
327
+ if (this._samples === sampleCount) {
328
+ return;
329
+ }
330
+ this._samples = sampleCount;
331
+ this._buildPipeline();
937
332
  }
938
- if (this.volumetricLightSmoothYPostProcess) {
939
- this.volumetricLightSmoothYPostProcess.dispose(camera);
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
- if (this.volumetricLightMergePostProces) {
942
- this.volumetricLightMergePostProces.dispose(camera);
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
- if (this.volumetricLightFinalPostProcess) {
945
- this.volumetricLightFinalPostProcess.dispose(camera);
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
- if (this.lensFlarePostProcess) {
948
- this.lensFlarePostProcess.dispose(camera);
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
- if (this.lensFlareComposePostProcess) {
951
- this.lensFlareComposePostProcess.dispose(camera);
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
- for (let j = 0; j < this.luminanceDownSamplePostProcesses.length; j++) {
954
- this.luminanceDownSamplePostProcesses[j].dispose(camera);
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
- if (this.luminancePostProcess) {
957
- this.luminancePostProcess.dispose(camera);
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
- if (this.hdrPostProcess) {
960
- this.hdrPostProcess.dispose(camera);
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
- if (this.hdrFinalPostProcess) {
963
- this.hdrFinalPostProcess.dispose(camera);
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
- if (this.depthOfFieldPostProcess) {
966
- this.depthOfFieldPostProcess.dispose(camera);
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
- if (this.motionBlurPostProcess) {
969
- this.motionBlurPostProcess.dispose(camera);
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
- if (this.fxaaPostProcess) {
972
- this.fxaaPostProcess.dispose(camera);
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
- for (let j = 0; j < this.blurHPostProcesses.length; j++) {
975
- this.blurHPostProcesses[j].dispose(camera);
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
- for (let j = 0; j < this.blurVPostProcesses.length; j++) {
978
- this.blurVPostProcesses[j].dispose(camera);
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
- this.originalPostProcess = null;
982
- this.downSampleX4PostProcess = null;
983
- this.brightPassPostProcess = null;
984
- this.textureAdderPostProcess = null;
985
- this.textureAdderFinalPostProcess = null;
986
- this.volumetricLightPostProcess = null;
987
- this.volumetricLightSmoothXPostProcess = null;
988
- this.volumetricLightSmoothYPostProcess = null;
989
- this.volumetricLightMergePostProces = null;
990
- this.volumetricLightFinalPostProcess = null;
991
- this.lensFlarePostProcess = null;
992
- this.lensFlareComposePostProcess = null;
993
- this.luminancePostProcess = null;
994
- this.hdrPostProcess = null;
995
- this.hdrFinalPostProcess = null;
996
- this.depthOfFieldPostProcess = null;
997
- this.motionBlurPostProcess = null;
998
- this.fxaaPostProcess = null;
999
- this.screenSpaceReflectionPostProcess = null;
1000
- this.luminanceDownSamplePostProcesses.length = 0;
1001
- this.blurHPostProcesses.length = 0;
1002
- this.blurVPostProcesses.length = 0;
1003
- }
1004
- /**
1005
- * Dispose of the pipeline and stop all post processes
1006
- */
1007
- dispose() {
1008
- this._disposePostProcesses();
1009
- this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
1010
- this._scene.postProcessRenderPipelineManager.removePipeline(this._name);
1011
- super.dispose();
1012
- }
1013
- /**
1014
- * Serialize the rendering pipeline (Used when exporting)
1015
- * @returns the serialized object
1016
- */
1017
- serialize() {
1018
- const serializationObject = SerializationHelper.Serialize(this);
1019
- if (this.sourceLight) {
1020
- serializationObject.sourceLightId = this.sourceLight.id;
1021
- }
1022
- if (this.screenSpaceReflectionPostProcess) {
1023
- serializationObject.screenSpaceReflectionPostProcess = SerializationHelper.Serialize(this.screenSpaceReflectionPostProcess);
1024
- }
1025
- serializationObject.customType = "StandardRenderingPipeline";
1026
- return serializationObject;
1027
- }
1028
- }
1029
- /**
1030
- * Luminance steps
1031
- */
1032
- StandardRenderingPipeline.LuminanceSteps = 6;
1033
- __decorate([
1034
- serialize()
1035
- ], StandardRenderingPipeline.prototype, "brightThreshold", void 0);
1036
- __decorate([
1037
- serialize()
1038
- ], StandardRenderingPipeline.prototype, "blurWidth", void 0);
1039
- __decorate([
1040
- serialize()
1041
- ], StandardRenderingPipeline.prototype, "horizontalBlur", void 0);
1042
- __decorate([
1043
- serialize()
1044
- ], StandardRenderingPipeline.prototype, "exposure", null);
1045
- __decorate([
1046
- serializeAsTexture("lensTexture")
1047
- ], StandardRenderingPipeline.prototype, "lensTexture", void 0);
1048
- __decorate([
1049
- serialize()
1050
- ], StandardRenderingPipeline.prototype, "volumetricLightCoefficient", void 0);
1051
- __decorate([
1052
- serialize()
1053
- ], StandardRenderingPipeline.prototype, "volumetricLightPower", void 0);
1054
- __decorate([
1055
- serialize()
1056
- ], StandardRenderingPipeline.prototype, "volumetricLightBlurScale", void 0);
1057
- __decorate([
1058
- serialize()
1059
- ], StandardRenderingPipeline.prototype, "hdrMinimumLuminance", void 0);
1060
- __decorate([
1061
- serialize()
1062
- ], StandardRenderingPipeline.prototype, "hdrDecreaseRate", void 0);
1063
- __decorate([
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