@babylonjs/core 7.52.2 → 7.53.0

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 (211) hide show
  1. package/AudioV2/abstractAudio/abstractAudioBus.d.ts +11 -0
  2. package/AudioV2/abstractAudio/abstractAudioBus.js +10 -0
  3. package/AudioV2/abstractAudio/abstractAudioBus.js.map +1 -1
  4. package/AudioV2/abstractAudio/abstractSound.d.ts +10 -3
  5. package/AudioV2/abstractAudio/abstractSound.js +10 -0
  6. package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
  7. package/AudioV2/abstractAudio/audioBus.d.ts +4 -4
  8. package/AudioV2/abstractAudio/audioBus.js.map +1 -1
  9. package/AudioV2/abstractAudio/mainAudioBus.d.ts +2 -2
  10. package/AudioV2/abstractAudio/mainAudioBus.js.map +1 -1
  11. package/AudioV2/abstractAudio/staticSound.d.ts +5 -5
  12. package/AudioV2/abstractAudio/staticSound.js +3 -3
  13. package/AudioV2/abstractAudio/staticSound.js.map +1 -1
  14. package/AudioV2/abstractAudio/streamingSound.d.ts +1 -1
  15. package/AudioV2/abstractAudio/streamingSound.js +1 -1
  16. package/AudioV2/abstractAudio/streamingSound.js.map +1 -1
  17. package/AudioV2/abstractAudio/subNodes/abstractAudioSubGraph.d.ts +30 -9
  18. package/AudioV2/abstractAudio/subNodes/abstractAudioSubGraph.js +52 -26
  19. package/AudioV2/abstractAudio/subNodes/abstractAudioSubGraph.js.map +1 -1
  20. package/AudioV2/abstractAudio/subNodes/audioAnalyzerSubNode.d.ts +24 -0
  21. package/AudioV2/abstractAudio/subNodes/audioAnalyzerSubNode.js +30 -0
  22. package/AudioV2/abstractAudio/subNodes/audioAnalyzerSubNode.js.map +1 -0
  23. package/AudioV2/abstractAudio/subNodes/audioSubNode.d.ts +1 -0
  24. package/AudioV2/abstractAudio/subNodes/audioSubNode.js +1 -0
  25. package/AudioV2/abstractAudio/subNodes/audioSubNode.js.map +1 -1
  26. package/AudioV2/abstractAudio/subNodes/stereoAudioSubNode.js.map +1 -1
  27. package/AudioV2/abstractAudio/subProperties/abstractAudioAnalyzer.d.ts +86 -0
  28. package/AudioV2/abstractAudio/subProperties/abstractAudioAnalyzer.js +29 -0
  29. package/AudioV2/abstractAudio/subProperties/abstractAudioAnalyzer.js.map +1 -0
  30. package/AudioV2/abstractAudio/subProperties/audioAnalyzer.d.ts +35 -0
  31. package/AudioV2/abstractAudio/subProperties/audioAnalyzer.js +96 -0
  32. package/AudioV2/abstractAudio/subProperties/audioAnalyzer.js.map +1 -0
  33. package/AudioV2/abstractAudio/subProperties/index.d.ts +1 -0
  34. package/AudioV2/abstractAudio/subProperties/index.js +1 -0
  35. package/AudioV2/abstractAudio/subProperties/index.js.map +1 -1
  36. package/AudioV2/abstractAudio/subProperties/spatialAudio.js +10 -5
  37. package/AudioV2/abstractAudio/subProperties/spatialAudio.js.map +1 -1
  38. package/AudioV2/webAudio/subNodes/webAudioAnalyzerSubNode.d.ts +37 -0
  39. package/AudioV2/webAudio/subNodes/webAudioAnalyzerSubNode.js +85 -0
  40. package/AudioV2/webAudio/subNodes/webAudioAnalyzerSubNode.js.map +1 -0
  41. package/AudioV2/webAudio/subNodes/webAudioBaseSubGraph.d.ts +5 -3
  42. package/AudioV2/webAudio/subNodes/webAudioBaseSubGraph.js +25 -2
  43. package/AudioV2/webAudio/subNodes/webAudioBaseSubGraph.js.map +1 -1
  44. package/AudioV2/webAudio/subNodes/webAudioBusAndSoundSubGraph.d.ts +2 -1
  45. package/AudioV2/webAudio/subNodes/webAudioBusAndSoundSubGraph.js +33 -18
  46. package/AudioV2/webAudio/subNodes/webAudioBusAndSoundSubGraph.js.map +1 -1
  47. package/Engines/WebGPU/webgpuTextureManager.d.ts +0 -1
  48. package/Engines/WebGPU/webgpuTextureManager.js +2 -57
  49. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  50. package/Engines/abstractEngine.d.ts +6 -0
  51. package/Engines/abstractEngine.js +3 -3
  52. package/Engines/abstractEngine.js.map +1 -1
  53. package/Engines/engine.common.js +4 -0
  54. package/Engines/engine.common.js.map +1 -1
  55. package/Engines/nativeEngine.d.ts +1 -0
  56. package/Engines/nativeEngine.js +3 -0
  57. package/Engines/nativeEngine.js.map +1 -1
  58. package/Engines/nullEngine.d.ts +1 -0
  59. package/Engines/nullEngine.js +1 -0
  60. package/Engines/nullEngine.js.map +1 -1
  61. package/Engines/thinEngine.d.ts +1 -0
  62. package/Engines/thinEngine.js +7 -4
  63. package/Engines/thinEngine.js.map +1 -1
  64. package/Engines/webgpuEngine.d.ts +2 -1
  65. package/Engines/webgpuEngine.js +12 -9
  66. package/Engines/webgpuEngine.js.map +1 -1
  67. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.d.ts +3 -12
  68. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.js +16 -36
  69. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.js.map +1 -1
  70. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.d.ts +5 -1
  71. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js +17 -4
  72. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
  73. package/FlowGraph/Blocks/Data/flowGraphDataSwitchBlock.d.ts +48 -0
  74. package/FlowGraph/Blocks/Data/flowGraphDataSwitchBlock.js +54 -0
  75. package/FlowGraph/Blocks/Data/flowGraphDataSwitchBlock.js.map +1 -0
  76. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.d.ts +3 -11
  77. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js +5 -14
  78. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js.map +1 -1
  79. package/FlowGraph/Blocks/Data/index.d.ts +1 -0
  80. package/FlowGraph/Blocks/Data/index.js +1 -0
  81. package/FlowGraph/Blocks/Data/index.js.map +1 -1
  82. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +1 -0
  83. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +19 -13
  84. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
  85. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js +3 -5
  86. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
  87. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.js +1 -1
  88. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.js.map +1 -1
  89. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.js +2 -4
  90. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.js.map +1 -1
  91. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js +1 -1
  92. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
  93. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +1 -2
  94. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
  95. package/FlowGraph/Blocks/flowGraphBlockFactory.js +2 -0
  96. package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
  97. package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +2 -1
  98. package/FlowGraph/Blocks/flowGraphBlockNames.js +1 -0
  99. package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -1
  100. package/FlowGraph/CustomTypes/flowGraphInteger.d.ts +1 -0
  101. package/FlowGraph/CustomTypes/flowGraphInteger.js +3 -0
  102. package/FlowGraph/CustomTypes/flowGraphInteger.js.map +1 -1
  103. package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +2 -0
  104. package/FlowGraph/CustomTypes/flowGraphMatrix.js +6 -0
  105. package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
  106. package/FlowGraph/flowGraphExecutionBlock.d.ts +1 -0
  107. package/FlowGraph/flowGraphExecutionBlock.js +4 -0
  108. package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
  109. package/FlowGraph/utils.d.ts +2 -1
  110. package/FlowGraph/utils.js +7 -2
  111. package/FlowGraph/utils.js.map +1 -1
  112. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js +2 -2
  113. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js.map +1 -1
  114. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js +2 -2
  115. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js.map +1 -1
  116. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.d.ts +126 -0
  117. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.js +497 -0
  118. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.js.map +1 -0
  119. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.d.ts +6 -0
  120. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +30 -4
  121. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
  122. package/FrameGraph/Node/Blocks/index.d.ts +1 -0
  123. package/FrameGraph/Node/Blocks/index.js +1 -0
  124. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  125. package/FrameGraph/Node/nodeRenderGraph.js +1 -1
  126. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  127. package/FrameGraph/Tasks/PostProcesses/bloomTask.d.ts +2 -3
  128. package/FrameGraph/Tasks/PostProcesses/bloomTask.js +3 -4
  129. package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -1
  130. package/FrameGraph/Tasks/PostProcesses/blurTask.js +2 -2
  131. package/FrameGraph/Tasks/PostProcesses/blurTask.js.map +1 -1
  132. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.d.ts +2 -3
  133. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js +4 -5
  134. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js.map +1 -1
  135. package/FrameGraph/Tasks/PostProcesses/postProcessTask.d.ts +6 -0
  136. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +14 -0
  137. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -1
  138. package/FrameGraph/Tasks/PostProcesses/ssrBlurTask.d.ts +11 -0
  139. package/FrameGraph/Tasks/PostProcesses/ssrBlurTask.js +18 -0
  140. package/FrameGraph/Tasks/PostProcesses/ssrBlurTask.js.map +1 -0
  141. package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.d.ts +76 -0
  142. package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js +170 -0
  143. package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js.map +1 -0
  144. package/FrameGraph/Tasks/PostProcesses/ssrTask.d.ts +16 -0
  145. package/FrameGraph/Tasks/PostProcesses/ssrTask.js +45 -0
  146. package/FrameGraph/Tasks/PostProcesses/ssrTask.js.map +1 -0
  147. package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +10 -0
  148. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +29 -0
  149. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
  150. package/FrameGraph/frameGraph.d.ts +7 -3
  151. package/FrameGraph/frameGraph.js +10 -4
  152. package/FrameGraph/frameGraph.js.map +1 -1
  153. package/FrameGraph/frameGraphTextureManager.d.ts +2 -1
  154. package/FrameGraph/frameGraphTextureManager.js +4 -3
  155. package/FrameGraph/frameGraphTextureManager.js.map +1 -1
  156. package/FrameGraph/index.d.ts +1 -0
  157. package/FrameGraph/index.js +1 -0
  158. package/FrameGraph/index.js.map +1 -1
  159. package/Materials/Node/nodeMaterial.js +3 -0
  160. package/Materials/Node/nodeMaterial.js.map +1 -1
  161. package/Materials/PBR/pbrBaseMaterial.js +1 -1
  162. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  163. package/Materials/effectRenderer.js +1 -1
  164. package/Materials/effectRenderer.js.map +1 -1
  165. package/Materials/material.js +5 -3
  166. package/Materials/material.js.map +1 -1
  167. package/Materials/materialHelper.geometryrendering.d.ts +7 -5
  168. package/Materials/materialHelper.geometryrendering.js +8 -3
  169. package/Materials/materialHelper.geometryrendering.js.map +1 -1
  170. package/Materials/standardMaterial.js +1 -1
  171. package/Materials/standardMaterial.js.map +1 -1
  172. package/Meshes/Builders/shapeBuilder.d.ts +2 -0
  173. package/Meshes/Builders/shapeBuilder.js +7 -4
  174. package/Meshes/Builders/shapeBuilder.js.map +1 -1
  175. package/Meshes/geometry.js +4 -0
  176. package/Meshes/geometry.js.map +1 -1
  177. package/Particles/particleSystemComponent.d.ts +2 -1
  178. package/Particles/particleSystemComponent.js +2 -2
  179. package/Particles/particleSystemComponent.js.map +1 -1
  180. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.d.ts +23 -30
  181. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +226 -411
  182. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
  183. package/PostProcesses/RenderPipeline/Pipelines/thinSSRRenderingPipeline.d.ts +222 -0
  184. package/PostProcesses/RenderPipeline/Pipelines/thinSSRRenderingPipeline.js +373 -0
  185. package/PostProcesses/RenderPipeline/Pipelines/thinSSRRenderingPipeline.js.map +1 -0
  186. package/PostProcesses/postProcess.d.ts +5 -0
  187. package/PostProcesses/postProcess.js +10 -2
  188. package/PostProcesses/postProcess.js.map +1 -1
  189. package/PostProcesses/thinDepthOfFieldEffect.d.ts +4 -4
  190. package/PostProcesses/thinDepthOfFieldEffect.js.map +1 -1
  191. package/PostProcesses/thinSSRBlurCombinerPostProcess.d.ts +41 -0
  192. package/PostProcesses/thinSSRBlurCombinerPostProcess.js +185 -0
  193. package/PostProcesses/thinSSRBlurCombinerPostProcess.js.map +1 -0
  194. package/PostProcesses/thinSSRBlurPostProcess.d.ts +18 -0
  195. package/PostProcesses/thinSSRBlurPostProcess.js +47 -0
  196. package/PostProcesses/thinSSRBlurPostProcess.js.map +1 -0
  197. package/PostProcesses/thinSSRPostProcess.d.ts +94 -0
  198. package/PostProcesses/thinSSRPostProcess.js +416 -0
  199. package/PostProcesses/thinSSRPostProcess.js.map +1 -0
  200. package/Rendering/IBLShadows/iblShadowsRenderPipeline.d.ts +2 -0
  201. package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +2 -0
  202. package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
  203. package/Rendering/iblCdfGenerator.js +1 -1
  204. package/Rendering/iblCdfGenerator.js.map +1 -1
  205. package/Shaders/screenSpaceReflection2BlurCombiner.fragment.js +13 -2
  206. package/Shaders/screenSpaceReflection2BlurCombiner.fragment.js.map +1 -1
  207. package/ShadersWGSL/geometry.fragment.js +1 -1
  208. package/ShadersWGSL/geometry.fragment.js.map +1 -1
  209. package/ShadersWGSL/screenSpaceReflection2BlurCombiner.fragment.js +13 -2
  210. package/ShadersWGSL/screenSpaceReflection2BlurCombiner.fragment.js.map +1 -1
  211. package/package.json +1 -1
@@ -2,7 +2,6 @@ import { __decorate } from "../../../tslib.es6.js";
2
2
  /* eslint-disable @typescript-eslint/naming-convention */
3
3
  import { serialize } from "../../../Misc/decorators.js";
4
4
  import { SerializationHelper } from "../../../Misc/decorators.serialization.js";
5
- import { Vector3, Matrix, Quaternion, TmpVectors } from "../../../Maths/math.vector.js";
6
5
  import { PostProcess } from "../../postProcess.js";
7
6
  import { PostProcessRenderPipeline } from "../postProcessRenderPipeline.js";
8
7
  import { PostProcessRenderEffect } from "../postProcessRenderEffect.js";
@@ -11,9 +10,11 @@ import { ScreenSpaceReflections2Configuration } from "../../../Rendering/screenS
11
10
  import { GeometryBufferRenderer } from "../../../Rendering/geometryBufferRenderer.js";
12
11
 
13
12
  import { DepthRenderer } from "../../../Rendering/depthRenderer.js";
13
+ import { ThinSSRRenderingPipeline } from "./thinSSRRenderingPipeline.js";
14
+ import { ThinSSRPostProcess } from "../../thinSSRPostProcess.js";
15
+ import { ThinSSRBlurPostProcess } from "../../thinSSRBlurPostProcess.js";
16
+ import { ThinSSRBlurCombinerPostProcess } from "../../thinSSRBlurCombinerPostProcess.js";
14
17
  import "../postProcessRenderPipelineManagerSceneComponent.js";
15
- const trs = Matrix.Compose(new Vector3(0.5, 0.5, 0.5), Quaternion.Identity(), new Vector3(0.5, 0.5, 0.5));
16
- const trsWebGPU = Matrix.Compose(new Vector3(0.5, 0.5, 1), Quaternion.Identity(), new Vector3(0.5, 0.5, 0));
17
18
  /**
18
19
  * Render pipeline to produce Screen Space Reflections (SSR) effect
19
20
  *
@@ -36,29 +37,109 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
36
37
  return;
37
38
  }
38
39
  this._samples = sampleCount;
39
- this._buildPipeline();
40
+ if (this._ssrPostProcess) {
41
+ this._ssrPostProcess.samples = this.samples;
42
+ }
40
43
  }
41
44
  get samples() {
42
45
  return this._samples;
43
46
  }
47
+ /**
48
+ * Gets or sets the maxDistance used to define how far we look for reflection during the ray-marching on the reflected ray (default: 1000).
49
+ * Note that this value is a view (camera) space distance (not pixels!).
50
+ */
51
+ get maxDistance() {
52
+ return this._thinSSRRenderingPipeline.maxDistance;
53
+ }
54
+ set maxDistance(distance) {
55
+ this._thinSSRRenderingPipeline.maxDistance = distance;
56
+ }
57
+ /**
58
+ * Gets or sets the step size used to iterate until the effect finds the color of the reflection's pixel. Should be an integer \>= 1 as it is the number of pixels we advance at each step (default: 1).
59
+ * Use higher values to improve performances (but at the expense of quality).
60
+ */
61
+ get step() {
62
+ return this._thinSSRRenderingPipeline.step;
63
+ }
64
+ set step(step) {
65
+ this._thinSSRRenderingPipeline.step = step;
66
+ }
67
+ /**
68
+ * Gets or sets the thickness value used as tolerance when computing the intersection between the reflected ray and the scene (default: 0.5).
69
+ * If setting "enableAutomaticThicknessComputation" to true, you can use lower values for "thickness" (even 0), as the geometry thickness
70
+ * is automatically computed thank to the regular depth buffer + the backface depth buffer
71
+ */
72
+ get thickness() {
73
+ return this._thinSSRRenderingPipeline.thickness;
74
+ }
75
+ set thickness(thickness) {
76
+ this._thinSSRRenderingPipeline.thickness = thickness;
77
+ }
78
+ /**
79
+ * Gets or sets the current reflection strength. 1.0 is an ideal value but can be increased/decreased for particular results (default: 1).
80
+ */
81
+ get strength() {
82
+ return this._thinSSRRenderingPipeline.strength;
83
+ }
84
+ set strength(strength) {
85
+ this._thinSSRRenderingPipeline.strength = strength;
86
+ }
87
+ /**
88
+ * Gets or sets the falloff exponent used to compute the reflection strength. Higher values lead to fainter reflections (default: 1).
89
+ */
90
+ get reflectionSpecularFalloffExponent() {
91
+ return this._thinSSRRenderingPipeline.reflectionSpecularFalloffExponent;
92
+ }
93
+ set reflectionSpecularFalloffExponent(exponent) {
94
+ this._thinSSRRenderingPipeline.reflectionSpecularFalloffExponent = exponent;
95
+ }
96
+ /**
97
+ * Maximum number of steps during the ray marching process after which we consider an intersection could not be found (default: 1000).
98
+ * Should be an integer value.
99
+ */
100
+ get maxSteps() {
101
+ return this._thinSSRRenderingPipeline.maxSteps;
102
+ }
103
+ set maxSteps(steps) {
104
+ this._thinSSRRenderingPipeline.maxSteps = steps;
105
+ }
106
+ /**
107
+ * Gets or sets the factor applied when computing roughness. Default value is 0.2.
108
+ * When blurring based on roughness is enabled (meaning blurDispersionStrength \> 0), roughnessFactor is used as a global roughness factor applied on all objects.
109
+ * If you want to disable this global roughness set it to 0.
110
+ */
111
+ get roughnessFactor() {
112
+ return this._thinSSRRenderingPipeline.roughnessFactor;
113
+ }
114
+ set roughnessFactor(factor) {
115
+ this._thinSSRRenderingPipeline.roughnessFactor = factor;
116
+ }
117
+ /**
118
+ * Number of steps to skip at start when marching the ray to avoid self collisions (default: 1)
119
+ * 1 should normally be a good value, depending on the scene you may need to use a higher value (2 or 3)
120
+ */
121
+ get selfCollisionNumSkip() {
122
+ return this._thinSSRRenderingPipeline.selfCollisionNumSkip;
123
+ }
124
+ set selfCollisionNumSkip(skip) {
125
+ this._thinSSRRenderingPipeline.selfCollisionNumSkip = skip;
126
+ }
44
127
  /**
45
128
  * Gets or sets the minimum value for one of the reflectivity component of the material to consider it for SSR (default: 0.04).
46
129
  * If all r/g/b components of the reflectivity is below or equal this value, the pixel will not be considered reflective and SSR won't be applied.
47
130
  */
48
131
  get reflectivityThreshold() {
49
- return this._reflectivityThreshold;
132
+ return this._thinSSRRenderingPipeline.reflectivityThreshold;
50
133
  }
51
134
  set reflectivityThreshold(threshold) {
52
- if (threshold === this._reflectivityThreshold) {
135
+ const currentThreshold = this.reflectivityThreshold;
136
+ if (threshold === currentThreshold) {
53
137
  return;
54
138
  }
55
- if ((threshold === 0 && this._reflectivityThreshold !== 0) || (threshold !== 0 && this._reflectivityThreshold === 0)) {
56
- this._reflectivityThreshold = threshold;
139
+ this._thinSSRRenderingPipeline.reflectivityThreshold = threshold;
140
+ if ((threshold === 0 && currentThreshold !== 0) || (threshold !== 0 && currentThreshold === 0)) {
57
141
  this._buildPipeline();
58
142
  }
59
- else {
60
- this._reflectivityThreshold = threshold;
61
- }
62
143
  }
63
144
  /**
64
145
  * Gets or sets the downsample factor used to reduce the size of the texture used to compute the SSR contribution (default: 0).
@@ -66,48 +147,42 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
66
147
  * Note that it is used only when blurring is enabled (blurDispersionStrength \> 0), because in that mode the SSR contribution is generated in a separate texture.
67
148
  */
68
149
  get ssrDownsample() {
69
- return this._ssrDownsample;
150
+ return this._thinSSRRenderingPipeline.ssrDownsample;
70
151
  }
71
152
  set ssrDownsample(downsample) {
72
- if (downsample === this._ssrDownsample) {
73
- return;
74
- }
75
- this._ssrDownsample = downsample;
153
+ this._thinSSRRenderingPipeline.ssrDownsample = downsample;
76
154
  this._buildPipeline();
77
155
  }
78
156
  /**
79
- * Gets or sets the blur dispersion strength. Set this value to 0 to disable blurring (default: 0.05)
157
+ * Gets or sets the blur dispersion strength. Set this value to 0 to disable blurring (default: 0.03)
80
158
  * The reflections are blurred based on the roughness of the surface and the distance between the pixel shaded and the reflected pixel: the higher the distance the more blurry the reflection is.
81
159
  * blurDispersionStrength allows to increase or decrease this effect.
82
160
  */
83
161
  get blurDispersionStrength() {
84
- return this._blurDispersionStrength;
162
+ return this._thinSSRRenderingPipeline.blurDispersionStrength;
85
163
  }
86
164
  set blurDispersionStrength(strength) {
87
- if (strength === this._blurDispersionStrength) {
165
+ const currentStrength = this.blurDispersionStrength;
166
+ if (strength === currentStrength) {
88
167
  return;
89
168
  }
90
- const rebuild = (strength === 0 && this._blurDispersionStrength !== 0) || (strength !== 0 && this._blurDispersionStrength === 0);
91
- this._blurDispersionStrength = strength;
92
- if (rebuild) {
169
+ this._thinSSRRenderingPipeline.blurDispersionStrength = strength;
170
+ if ((strength === 0 && currentStrength !== 0) || (strength !== 0 && currentStrength === 0)) {
93
171
  this._buildPipeline();
94
172
  }
95
173
  }
96
174
  _useBlur() {
97
- return this._blurDispersionStrength > 0;
175
+ return this.blurDispersionStrength > 0;
98
176
  }
99
177
  /**
100
178
  * Gets or sets the downsample factor used to reduce the size of the textures used to blur the reflection effect (default: 0).
101
179
  * Use 0 to blur at full resolution, 1 to render at half resolution, 2 to render at 1/3 resolution, etc.
102
180
  */
103
181
  get blurDownsample() {
104
- return this._blurDownsample;
182
+ return this._thinSSRRenderingPipeline.blurDownsample;
105
183
  }
106
184
  set blurDownsample(downsample) {
107
- if (downsample === this._blurDownsample) {
108
- return;
109
- }
110
- this._blurDownsample = downsample;
185
+ this._thinSSRRenderingPipeline.blurDownsample = downsample;
111
186
  this._buildPipeline();
112
187
  }
113
188
  /**
@@ -116,127 +191,97 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
116
191
  * Note that this setting has no effect if step = 1: it's only used if step \> 1.
117
192
  */
118
193
  get enableSmoothReflections() {
119
- return this._enableSmoothReflections;
194
+ return this._thinSSRRenderingPipeline.enableSmoothReflections;
120
195
  }
121
196
  set enableSmoothReflections(enabled) {
122
- if (enabled === this._enableSmoothReflections) {
123
- return;
124
- }
125
- this._enableSmoothReflections = enabled;
126
- this._updateEffectDefines();
197
+ this._thinSSRRenderingPipeline.enableSmoothReflections = enabled;
198
+ }
199
+ get _useScreenspaceDepth() {
200
+ return this._thinSSRRenderingPipeline.useScreenspaceDepth;
127
201
  }
128
202
  /**
129
203
  * Gets or sets the environment cube texture used to define the reflection when the reflected rays of SSR leave the view space or when the maxDistance/maxSteps is reached.
130
204
  */
131
205
  get environmentTexture() {
132
- return this._environmentTexture;
206
+ return this._thinSSRRenderingPipeline.environmentTexture;
133
207
  }
134
208
  set environmentTexture(texture) {
135
- this._environmentTexture = texture;
136
- this._updateEffectDefines();
209
+ this._thinSSRRenderingPipeline.environmentTexture = texture;
137
210
  }
138
211
  /**
139
212
  * Gets or sets the boolean defining if the environment texture is a standard cubemap (false) or a probe (true). Default value is false.
140
213
  * Note: a probe cube texture is treated differently than an ordinary cube texture because the Y axis is reversed.
141
214
  */
142
215
  get environmentTextureIsProbe() {
143
- return this._environmentTextureIsProbe;
216
+ return this._thinSSRRenderingPipeline.environmentTextureIsProbe;
144
217
  }
145
218
  set environmentTextureIsProbe(isProbe) {
146
- this._environmentTextureIsProbe = isProbe;
147
- this._updateEffectDefines();
219
+ this._thinSSRRenderingPipeline.environmentTextureIsProbe = isProbe;
148
220
  }
149
221
  /**
150
222
  * Gets or sets a boolean indicating if the reflections should be attenuated at the screen borders (default: true).
151
223
  */
152
224
  get attenuateScreenBorders() {
153
- return this._attenuateScreenBorders;
225
+ return this._thinSSRRenderingPipeline.attenuateScreenBorders;
154
226
  }
155
227
  set attenuateScreenBorders(attenuate) {
156
- if (this._attenuateScreenBorders === attenuate) {
157
- return;
158
- }
159
- this._attenuateScreenBorders = attenuate;
160
- this._updateEffectDefines();
228
+ this._thinSSRRenderingPipeline.attenuateScreenBorders = attenuate;
161
229
  }
162
230
  /**
163
231
  * Gets or sets a boolean indicating if the reflections should be attenuated according to the distance of the intersection (default: true).
164
232
  */
165
233
  get attenuateIntersectionDistance() {
166
- return this._attenuateIntersectionDistance;
234
+ return this._thinSSRRenderingPipeline.attenuateIntersectionDistance;
167
235
  }
168
236
  set attenuateIntersectionDistance(attenuate) {
169
- if (this._attenuateIntersectionDistance === attenuate) {
170
- return;
171
- }
172
- this._attenuateIntersectionDistance = attenuate;
173
- this._updateEffectDefines();
237
+ this._thinSSRRenderingPipeline.attenuateIntersectionDistance = attenuate;
174
238
  }
175
239
  /**
176
240
  * Gets or sets a boolean indicating if the reflections should be attenuated according to the number of iterations performed to find the intersection (default: true).
177
241
  */
178
242
  get attenuateIntersectionIterations() {
179
- return this._attenuateIntersectionIterations;
243
+ return this._thinSSRRenderingPipeline.attenuateIntersectionIterations;
180
244
  }
181
245
  set attenuateIntersectionIterations(attenuate) {
182
- if (this._attenuateIntersectionIterations === attenuate) {
183
- return;
184
- }
185
- this._attenuateIntersectionIterations = attenuate;
186
- this._updateEffectDefines();
246
+ this._thinSSRRenderingPipeline.attenuateIntersectionIterations = attenuate;
187
247
  }
188
248
  /**
189
249
  * Gets or sets a boolean indicating if the reflections should be attenuated when the reflection ray is facing the camera (the view direction) (default: false).
190
250
  */
191
251
  get attenuateFacingCamera() {
192
- return this._attenuateFacingCamera;
252
+ return this._thinSSRRenderingPipeline.attenuateFacingCamera;
193
253
  }
194
254
  set attenuateFacingCamera(attenuate) {
195
- if (this._attenuateFacingCamera === attenuate) {
196
- return;
197
- }
198
- this._attenuateFacingCamera = attenuate;
199
- this._updateEffectDefines();
255
+ this._thinSSRRenderingPipeline.attenuateFacingCamera = attenuate;
200
256
  }
201
257
  /**
202
258
  * Gets or sets a boolean indicating if the backface reflections should be attenuated (default: false).
203
259
  */
204
260
  get attenuateBackfaceReflection() {
205
- return this._attenuateBackfaceReflection;
261
+ return this._thinSSRRenderingPipeline.attenuateBackfaceReflection;
206
262
  }
207
263
  set attenuateBackfaceReflection(attenuate) {
208
- if (this._attenuateBackfaceReflection === attenuate) {
209
- return;
210
- }
211
- this._attenuateBackfaceReflection = attenuate;
212
- this._updateEffectDefines();
264
+ this._thinSSRRenderingPipeline.attenuateBackfaceReflection = attenuate;
213
265
  }
214
266
  /**
215
267
  * Gets or sets a boolean indicating if the ray should be clipped to the frustum (default: true).
216
268
  * You can try to set this parameter to false to save some performances: it may produce some artefacts in some cases, but generally they won't really be visible
217
269
  */
218
270
  get clipToFrustum() {
219
- return this._clipToFrustum;
271
+ return this._thinSSRRenderingPipeline.clipToFrustum;
220
272
  }
221
273
  set clipToFrustum(clip) {
222
- if (this._clipToFrustum === clip) {
223
- return;
224
- }
225
- this._clipToFrustum = clip;
226
- this._updateEffectDefines();
274
+ this._thinSSRRenderingPipeline.clipToFrustum = clip;
227
275
  }
228
276
  /**
229
277
  * Gets or sets a boolean indicating whether the blending between the current color pixel and the reflection color should be done with a Fresnel coefficient (default: false).
230
278
  * It is more physically accurate to use the Fresnel coefficient (otherwise it uses the reflectivity of the material for blending), but it is also more expensive when you use blur (when blurDispersionStrength \> 0).
231
279
  */
232
280
  get useFresnel() {
233
- return this._useFresnel;
281
+ return this._thinSSRRenderingPipeline.useFresnel;
234
282
  }
235
283
  set useFresnel(fresnel) {
236
- if (this._useFresnel === fresnel) {
237
- return;
238
- }
239
- this._useFresnel = fresnel;
284
+ this._thinSSRRenderingPipeline.useFresnel = fresnel;
240
285
  this._buildPipeline();
241
286
  }
242
287
  /**
@@ -247,13 +292,10 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
247
292
  * Note that for performance reasons, this option will only apply to the first camera to which the rendering pipeline is attached!
248
293
  */
249
294
  get enableAutomaticThicknessComputation() {
250
- return this._enableAutomaticThicknessComputation;
295
+ return this._thinSSRRenderingPipeline.enableAutomaticThicknessComputation;
251
296
  }
252
297
  set enableAutomaticThicknessComputation(automatic) {
253
- if (this._enableAutomaticThicknessComputation === automatic) {
254
- return;
255
- }
256
- this._enableAutomaticThicknessComputation = automatic;
298
+ this._thinSSRRenderingPipeline.enableAutomaticThicknessComputation = automatic;
257
299
  this._buildPipeline();
258
300
  }
259
301
  /**
@@ -325,13 +367,10 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
325
367
  * The SSR effect works in linear space, so if the input texture is in gamma space, we must convert the texture to linear space before applying the effect
326
368
  */
327
369
  get inputTextureColorIsInGammaSpace() {
328
- return this._inputTextureColorIsInGammaSpace;
370
+ return this._thinSSRRenderingPipeline.inputTextureColorIsInGammaSpace;
329
371
  }
330
372
  set inputTextureColorIsInGammaSpace(gammaSpace) {
331
- if (this._inputTextureColorIsInGammaSpace === gammaSpace) {
332
- return;
333
- }
334
- this._inputTextureColorIsInGammaSpace = gammaSpace;
373
+ this._thinSSRRenderingPipeline.inputTextureColorIsInGammaSpace = gammaSpace;
335
374
  this._buildPipeline();
336
375
  }
337
376
  /**
@@ -339,13 +378,10 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
339
378
  * If you have a post-process that comes after the SSR and that post-process needs the input to be in a linear space, you must disable generateOutputInGammaSpace
340
379
  */
341
380
  get generateOutputInGammaSpace() {
342
- return this._generateOutputInGammaSpace;
381
+ return this._thinSSRRenderingPipeline.generateOutputInGammaSpace;
343
382
  }
344
383
  set generateOutputInGammaSpace(gammaSpace) {
345
- if (this._generateOutputInGammaSpace === gammaSpace) {
346
- return;
347
- }
348
- this._generateOutputInGammaSpace = gammaSpace;
384
+ this._thinSSRRenderingPipeline.generateOutputInGammaSpace = gammaSpace;
349
385
  this._buildPipeline();
350
386
  }
351
387
  /**
@@ -359,13 +395,10 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
359
395
  * You should try to get as few blue/red/yellow pixels as possible, as this means that the ray has gone further than if it had hit a surface.
360
396
  */
361
397
  get debug() {
362
- return this._debug;
398
+ return this._thinSSRRenderingPipeline.debug;
363
399
  }
364
400
  set debug(value) {
365
- if (this._debug === value) {
366
- return;
367
- }
368
- this._debug = value;
401
+ this._thinSSRRenderingPipeline.debug = value;
369
402
  this._buildPipeline();
370
403
  }
371
404
  /**
@@ -424,78 +457,23 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
424
457
  */
425
458
  this.SSRCombineRenderEffect = "SSRCombineRenderEffect";
426
459
  this._samples = 1;
427
- /**
428
- * Gets or sets the maxDistance used to define how far we look for reflection during the ray-marching on the reflected ray (default: 1000).
429
- * Note that this value is a view (camera) space distance (not pixels!).
430
- */
431
- this.maxDistance = 1000.0;
432
- /**
433
- * Gets or sets the step size used to iterate until the effect finds the color of the reflection's pixel. Should be an integer \>= 1 as it is the number of pixels we advance at each step (default: 1).
434
- * Use higher values to improve performances (but at the expense of quality).
435
- */
436
- this.step = 1.0;
437
- /**
438
- * Gets or sets the thickness value used as tolerance when computing the intersection between the reflected ray and the scene (default: 0.5).
439
- * If setting "enableAutomaticThicknessComputation" to true, you can use lower values for "thickness" (even 0), as the geometry thickness
440
- * is automatically computed thank to the regular depth buffer + the backface depth buffer
441
- */
442
- this.thickness = 0.5;
443
- /**
444
- * Gets or sets the current reflection strength. 1.0 is an ideal value but can be increased/decreased for particular results (default: 1).
445
- */
446
- this.strength = 1;
447
- /**
448
- * Gets or sets the falloff exponent used to compute the reflection strength. Higher values lead to fainter reflections (default: 1).
449
- */
450
- this.reflectionSpecularFalloffExponent = 1;
451
- /**
452
- * Maximum number of steps during the ray marching process after which we consider an intersection could not be found (default: 1000).
453
- * Should be an integer value.
454
- */
455
- this.maxSteps = 1000.0;
456
- /**
457
- * Gets or sets the factor applied when computing roughness. Default value is 0.2.
458
- * When blurring based on roughness is enabled (meaning blurDispersionStrength \> 0), roughnessFactor is used as a global roughness factor applied on all objects.
459
- * If you want to disable this global roughness set it to 0.
460
- */
461
- this.roughnessFactor = 0.2;
462
- /**
463
- * Number of steps to skip at start when marching the ray to avoid self collisions (default: 1)
464
- * 1 should normally be a good value, depending on the scene you may need to use a higher value (2 or 3)
465
- */
466
- this.selfCollisionNumSkip = 1;
467
- this._reflectivityThreshold = 0.04;
468
- this._ssrDownsample = 0;
469
- this._blurDispersionStrength = 0.03;
470
- this._blurDownsample = 0;
471
- this._enableSmoothReflections = false;
472
- this._useScreenspaceDepth = false;
473
- this._environmentTextureIsProbe = false;
474
- this._attenuateScreenBorders = true;
475
- this._attenuateIntersectionDistance = true;
476
- this._attenuateIntersectionIterations = true;
477
- this._attenuateFacingCamera = false;
478
- this._attenuateBackfaceReflection = false;
479
- this._clipToFrustum = true;
480
- this._useFresnel = false;
481
- this._enableAutomaticThicknessComputation = false;
482
460
  this._backfaceDepthTextureDownsample = 0;
483
461
  this._backfaceForceDepthWriteTransparentMeshes = true;
484
462
  this._isEnabled = true;
485
- this._inputTextureColorIsInGammaSpace = true;
486
- this._generateOutputInGammaSpace = true;
487
- this._debug = false;
488
463
  this._forceGeometryBuffer = false;
489
464
  this._isDirty = false;
490
465
  this._camerasToBeAttached = [];
466
+ this._thinSSRRenderingPipeline = new ThinSSRRenderingPipeline(name, scene);
467
+ this._thinSSRRenderingPipeline.isSSRSupported = false;
468
+ this._thinSSRRenderingPipeline.useScreenspaceDepth = useScreenspaceDepth;
491
469
  this._cameras = cameras || scene.cameras;
492
470
  this._cameras = this._cameras.slice();
493
471
  this._camerasToBeAttached = this._cameras.slice();
494
472
  this._scene = scene;
495
473
  this._textureType = textureType;
496
474
  this._forceGeometryBuffer = forceGeometryBuffer;
497
- this._useScreenspaceDepth = useScreenspaceDepth;
498
475
  if (this.isSupported) {
476
+ this._createSSRPostProcess();
499
477
  scene.postProcessRenderPipelineManager.addPipeline(this);
500
478
  if (this._forceGeometryBuffer) {
501
479
  const geometryBufferRenderer = scene.enableGeometryBufferRenderer();
@@ -513,6 +491,7 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
513
491
  prePassRenderer.markAsDirty();
514
492
  }
515
493
  }
494
+ this._thinSSRRenderingPipeline.isSSRSupported = !!this._geometryBufferRenderer || !!this._prePassRenderer;
516
495
  this._buildPipeline();
517
496
  }
518
497
  }
@@ -546,11 +525,13 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
546
525
  */
547
526
  dispose(disableGeometryBufferRenderer = false) {
548
527
  this._disposeDepthRenderer();
549
- this._disposePostProcesses();
528
+ this._disposeSSRPostProcess();
529
+ this._disposeBlurPostProcesses();
550
530
  if (disableGeometryBufferRenderer) {
551
531
  this._scene.disableGeometryBufferRenderer();
552
532
  }
553
533
  this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
534
+ this._thinSSRRenderingPipeline.dispose();
554
535
  super.dispose();
555
536
  }
556
537
  _getTextureSize() {
@@ -569,83 +550,6 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
569
550
  }
570
551
  return textureSize;
571
552
  }
572
- _updateEffectDefines() {
573
- const defines = [];
574
- if (this._geometryBufferRenderer || this._prePassRenderer) {
575
- defines.push("#define SSR_SUPPORTED");
576
- }
577
- if (this._enableSmoothReflections) {
578
- defines.push("#define SSRAYTRACE_ENABLE_REFINEMENT");
579
- }
580
- if (this._scene.useRightHandedSystem) {
581
- defines.push("#define SSRAYTRACE_RIGHT_HANDED_SCENE");
582
- }
583
- if (this._useScreenspaceDepth) {
584
- defines.push("#define SSRAYTRACE_SCREENSPACE_DEPTH");
585
- }
586
- if (this._environmentTexture) {
587
- defines.push("#define SSR_USE_ENVIRONMENT_CUBE");
588
- if (this._environmentTexture.boundingBoxSize) {
589
- defines.push("#define SSR_USE_LOCAL_REFLECTIONMAP_CUBIC");
590
- }
591
- if (this._environmentTexture.gammaSpace) {
592
- defines.push("#define SSR_ENVIRONMENT_CUBE_IS_GAMMASPACE");
593
- }
594
- }
595
- if (this._environmentTextureIsProbe) {
596
- defines.push("#define SSR_INVERTCUBICMAP");
597
- }
598
- if (this._enableAutomaticThicknessComputation) {
599
- defines.push("#define SSRAYTRACE_USE_BACK_DEPTHBUFFER");
600
- }
601
- if (this._attenuateScreenBorders) {
602
- defines.push("#define SSR_ATTENUATE_SCREEN_BORDERS");
603
- }
604
- if (this._attenuateIntersectionDistance) {
605
- defines.push("#define SSR_ATTENUATE_INTERSECTION_DISTANCE");
606
- }
607
- if (this._attenuateIntersectionIterations) {
608
- defines.push("#define SSR_ATTENUATE_INTERSECTION_NUMITERATIONS");
609
- }
610
- if (this._attenuateFacingCamera) {
611
- defines.push("#define SSR_ATTENUATE_FACING_CAMERA");
612
- }
613
- if (this._attenuateBackfaceReflection) {
614
- defines.push("#define SSR_ATTENUATE_BACKFACE_REFLECTION");
615
- }
616
- if (this._clipToFrustum) {
617
- defines.push("#define SSRAYTRACE_CLIP_TO_FRUSTUM");
618
- }
619
- if (this._useBlur()) {
620
- defines.push("#define SSR_USE_BLUR");
621
- }
622
- if (this._debug) {
623
- defines.push("#define SSRAYTRACE_DEBUG");
624
- }
625
- if (this._inputTextureColorIsInGammaSpace) {
626
- defines.push("#define SSR_INPUT_IS_GAMMA_SPACE");
627
- }
628
- if (this._generateOutputInGammaSpace) {
629
- defines.push("#define SSR_OUTPUT_IS_GAMMA_SPACE");
630
- }
631
- if (this._useFresnel) {
632
- defines.push("#define SSR_BLEND_WITH_FRESNEL");
633
- }
634
- if (this._reflectivityThreshold === 0) {
635
- defines.push("#define SSR_DISABLE_REFLECTIVITY_TEST");
636
- }
637
- if (this._geometryBufferRenderer?.generateNormalsInWorldSpace ?? this._prePassRenderer?.generateNormalsInWorldSpace) {
638
- defines.push("#define SSR_NORMAL_IS_IN_WORLDSPACE");
639
- }
640
- if (this._geometryBufferRenderer?.normalsAreUnsigned) {
641
- defines.push("#define SSR_DECODE_NORMAL");
642
- }
643
- const camera = this._cameras?.[0];
644
- if (camera && camera.mode === 1) {
645
- defines.push("#define ORTHOGRAPHIC_CAMERA");
646
- }
647
- this._ssrPostProcess?.updateEffect(defines.join("\n"));
648
- }
649
553
  _buildPipeline() {
650
554
  if (!this.isSupported) {
651
555
  return;
@@ -657,14 +561,17 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
657
561
  this._isDirty = false;
658
562
  const engine = this._scene.getEngine();
659
563
  this._disposeDepthRenderer();
660
- this._disposePostProcesses();
661
564
  if (this._cameras !== null) {
662
565
  this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
663
566
  // get back cameras to be used to reattach pipeline
664
567
  this._cameras = this._camerasToBeAttached.slice();
568
+ if (this._cameras.length > 0) {
569
+ this._thinSSRRenderingPipeline.camera = this._cameras[0];
570
+ }
665
571
  }
666
572
  this._reset();
667
- if (this._enableAutomaticThicknessComputation) {
573
+ this._thinSSRRenderingPipeline.normalsAreInWorldSpace = !!(this._geometryBufferRenderer?.generateNormalsInWorldSpace ?? this._prePassRenderer?.generateNormalsInWorldSpace);
574
+ if (this.enableAutomaticThicknessComputation) {
668
575
  const camera = this._cameras?.[0];
669
576
  if (camera) {
670
577
  this._depthRendererCamera = camera;
@@ -673,15 +580,15 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
673
580
  this._depthRenderer.clearColor.r = 1e8; // "infinity": put a big value because we use the storeCameraSpaceZ mode
674
581
  }
675
582
  this._depthRenderer.reverseCulling = true; // we generate depth for the back faces
676
- this._depthRenderer.forceDepthWriteTransparentMeshes = this._backfaceForceDepthWriteTransparentMeshes;
583
+ this._depthRenderer.forceDepthWriteTransparentMeshes = this.backfaceForceDepthWriteTransparentMeshes;
677
584
  this._resizeDepthRenderer();
678
585
  camera.customRenderTargets.push(this._depthRenderer.getDepthMap());
679
586
  }
680
587
  }
681
- this._createSSRPostProcess();
682
588
  this.addEffect(new PostProcessRenderEffect(engine, this.SSRRenderEffect, () => {
683
589
  return this._ssrPostProcess;
684
590
  }, true));
591
+ this._disposeBlurPostProcesses();
685
592
  if (this._useBlur()) {
686
593
  this._createBlurAndCombinerPostProcesses();
687
594
  this.addEffect(new PostProcessRenderEffect(engine, this.SSRBlurRenderEffect, () => {
@@ -701,8 +608,8 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
701
608
  }
702
609
  const textureSize = this._getTextureSize();
703
610
  const depthRendererSize = this._depthRenderer.getDepthMap().getSize();
704
- const width = Math.floor(textureSize.width / (this._backfaceDepthTextureDownsample + 1));
705
- const height = Math.floor(textureSize.height / (this._backfaceDepthTextureDownsample + 1));
611
+ const width = Math.floor(textureSize.width / (this.backfaceDepthTextureDownsample + 1));
612
+ const height = Math.floor(textureSize.height / (this.backfaceDepthTextureDownsample + 1));
706
613
  if (depthRendererSize.width !== width || depthRendererSize.height !== height) {
707
614
  this._depthRenderer.getDepthMap().resize({ width, height });
708
615
  }
@@ -720,49 +627,34 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
720
627
  }
721
628
  this._depthRenderer = null;
722
629
  }
723
- _disposePostProcesses() {
630
+ _disposeBlurPostProcesses() {
724
631
  for (let i = 0; i < this._cameras.length; i++) {
725
632
  const camera = this._cameras[i];
726
- this._ssrPostProcess?.dispose(camera);
727
633
  this._blurPostProcessX?.dispose(camera);
728
634
  this._blurPostProcessY?.dispose(camera);
729
635
  this._blurCombinerPostProcess?.dispose(camera);
730
636
  }
731
- this._ssrPostProcess = null;
732
637
  this._blurPostProcessX = null;
733
638
  this._blurPostProcessY = null;
734
639
  this._blurCombinerPostProcess = null;
735
640
  }
641
+ _disposeSSRPostProcess() {
642
+ for (let i = 0; i < this._cameras.length; i++) {
643
+ const camera = this._cameras[i];
644
+ this._ssrPostProcess?.dispose(camera);
645
+ }
646
+ this._ssrPostProcess = null;
647
+ }
736
648
  _createSSRPostProcess() {
737
- this._ssrPostProcess = new PostProcess("ssr", "screenSpaceReflection2", [
738
- "projection",
739
- "invProjectionMatrix",
740
- "view",
741
- "invView",
742
- "thickness",
743
- "reflectionSpecularFalloffExponent",
744
- "strength",
745
- "stepSize",
746
- "maxSteps",
747
- "roughnessFactor",
748
- "projectionPixel",
749
- "nearPlaneZ",
750
- "farPlaneZ",
751
- "maxDistance",
752
- "selfCollisionNumSkip",
753
- "vReflectionPosition",
754
- "vReflectionSize",
755
- "backSizeFactor",
756
- "reflectivityThreshold",
757
- ], ["textureSampler", "normalSampler", "reflectivitySampler", "depthSampler", "envCubeSampler", "backDepthSampler"], 1.0, null, this._textureType, this._scene.getEngine(), false, "", this._textureType, undefined, undefined, undefined, undefined, this._scene.getEngine().isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */, (useWebGPU, list) => {
758
- if (useWebGPU) {
759
- list.push(import("../../../ShadersWGSL/screenSpaceReflection2.fragment.js"));
760
- }
761
- else {
762
- list.push(import("../../../Shaders/screenSpaceReflection2.fragment.js"));
763
- }
649
+ this._ssrPostProcess = new PostProcess("ssr", ThinSSRPostProcess.FragmentUrl, {
650
+ uniformNames: ThinSSRPostProcess.Uniforms,
651
+ samplerNames: ThinSSRPostProcess.Samplers,
652
+ size: 1.0,
653
+ samplingMode: 2,
654
+ engine: this._scene.getEngine(),
655
+ textureType: this._textureType,
656
+ effectWrapper: this._thinSSRRenderingPipeline._ssrPostProcess,
764
657
  });
765
- this._updateEffectDefines();
766
658
  this._ssrPostProcess.onApply = (effect) => {
767
659
  this._resizeDepthRenderer();
768
660
  const geometryBufferRenderer = this._geometryBufferRenderer;
@@ -792,45 +684,13 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
792
684
  effect.setTexture("depthSampler", prePassRenderer.getRenderTarget().textures[depthIndex]);
793
685
  effect.setTexture("reflectivitySampler", prePassRenderer.getRenderTarget().textures[roughnessIndex]);
794
686
  }
795
- if (this._enableAutomaticThicknessComputation && this._depthRenderer) {
687
+ if (this.enableAutomaticThicknessComputation && this._depthRenderer) {
796
688
  effect.setTexture("backDepthSampler", this._depthRenderer.getDepthMap());
797
- effect.setFloat("backSizeFactor", this._backfaceDepthTextureDownsample + 1);
689
+ effect.setFloat("backSizeFactor", this.backfaceDepthTextureDownsample + 1);
798
690
  }
799
- const camera = this._scene.activeCamera;
800
- if (!camera) {
801
- return;
802
- }
803
- const viewMatrix = camera.getViewMatrix();
804
- const projectionMatrix = camera.getProjectionMatrix();
805
- projectionMatrix.invertToRef(TmpVectors.Matrix[0]);
806
- viewMatrix.invertToRef(TmpVectors.Matrix[1]);
807
- effect.setMatrix("projection", projectionMatrix);
808
- effect.setMatrix("view", viewMatrix);
809
- effect.setMatrix("invView", TmpVectors.Matrix[1]);
810
- effect.setMatrix("invProjectionMatrix", TmpVectors.Matrix[0]);
811
- effect.setFloat("thickness", this.thickness);
812
- effect.setFloat("reflectionSpecularFalloffExponent", this.reflectionSpecularFalloffExponent);
813
- effect.setFloat("strength", this.strength);
814
- effect.setFloat("stepSize", this.step);
815
- effect.setFloat("maxSteps", this.maxSteps);
816
- effect.setFloat("roughnessFactor", this.roughnessFactor);
817
- effect.setFloat("nearPlaneZ", camera.minZ);
818
- effect.setFloat("farPlaneZ", camera.maxZ);
819
- effect.setFloat("maxDistance", this.maxDistance);
820
- effect.setFloat("selfCollisionNumSkip", this.selfCollisionNumSkip);
821
- effect.setFloat("reflectivityThreshold", this._reflectivityThreshold);
822
691
  const textureSize = this._getTextureSize();
823
- Matrix.ScalingToRef(textureSize.width, textureSize.height, 1, TmpVectors.Matrix[2]);
824
- projectionMatrix.multiplyToRef(this._scene.getEngine().isWebGPU ? trsWebGPU : trs, TmpVectors.Matrix[3]);
825
- TmpVectors.Matrix[3].multiplyToRef(TmpVectors.Matrix[2], TmpVectors.Matrix[4]);
826
- effect.setMatrix("projectionPixel", TmpVectors.Matrix[4]);
827
- if (this._environmentTexture) {
828
- effect.setTexture("envCubeSampler", this._environmentTexture);
829
- if (this._environmentTexture.boundingBoxSize) {
830
- effect.setVector3("vReflectionPosition", this._environmentTexture.boundingBoxPosition);
831
- effect.setVector3("vReflectionSize", this._environmentTexture.boundingBoxSize);
832
- }
833
- }
692
+ this._thinSSRRenderingPipeline._ssrPostProcess.textureWidth = textureSize.width;
693
+ this._thinSSRRenderingPipeline._ssrPostProcess.textureHeight = textureSize.height;
834
694
  };
835
695
  this._ssrPostProcess.samples = this.samples;
836
696
  if (!this._forceGeometryBuffer) {
@@ -839,62 +699,42 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
839
699
  }
840
700
  _createBlurAndCombinerPostProcesses() {
841
701
  const engine = this._scene.getEngine();
842
- this._blurPostProcessX = new PostProcess("SSRblurX", "screenSpaceReflection2Blur", ["texelOffsetScale"], ["textureSampler"], this._useBlur() ? 1 / (this._ssrDownsample + 1) : 1, null, 2, engine, false, "", this._textureType, undefined, undefined, undefined, undefined, this._scene.getEngine().isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */, (useWebGPU, list) => {
843
- if (useWebGPU) {
844
- list.push(import("../../../ShadersWGSL/screenSpaceReflection2Blur.fragment.js"));
845
- }
846
- else {
847
- list.push(import("../../../Shaders/screenSpaceReflection2Blur.fragment.js"));
848
- }
702
+ this._blurPostProcessX = new PostProcess("SSRblurX", ThinSSRBlurPostProcess.FragmentUrl, {
703
+ uniformNames: ThinSSRBlurPostProcess.Uniforms,
704
+ samplerNames: ThinSSRBlurPostProcess.Samplers,
705
+ size: 1 / (this.ssrDownsample + 1),
706
+ samplingMode: 2,
707
+ engine,
708
+ textureType: this._textureType,
709
+ effectWrapper: this._thinSSRRenderingPipeline._ssrBlurXPostProcess,
849
710
  });
850
711
  this._blurPostProcessX.autoClear = false;
851
- this._blurPostProcessX.onApplyObservable.add((effect) => {
852
- const width = this._blurPostProcessX?.inputTexture.width ?? this._scene.getEngine().getRenderWidth();
853
- effect.setFloat2("texelOffsetScale", this._blurDispersionStrength / width, 0);
712
+ this._blurPostProcessX.onApplyObservable.add(() => {
713
+ this._thinSSRRenderingPipeline._ssrBlurXPostProcess.textureWidth = this._blurPostProcessX?.inputTexture.width ?? this._scene.getEngine().getRenderWidth();
714
+ this._thinSSRRenderingPipeline._ssrBlurXPostProcess.textureHeight = 1; // not used
854
715
  });
855
- this._blurPostProcessY = new PostProcess("SSRblurY", "screenSpaceReflection2Blur", ["texelOffsetScale"], ["textureSampler"], this._useBlur() ? 1 / (this._blurDownsample + 1) : 1, null, 2, engine, false, "", this._textureType, undefined, undefined, undefined, undefined, this._scene.getEngine().isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */, (useWebGPU, list) => {
856
- if (useWebGPU) {
857
- list.push(import("../../../ShadersWGSL/screenSpaceReflection2Blur.fragment.js"));
858
- }
859
- else {
860
- list.push(import("../../../Shaders/screenSpaceReflection2Blur.fragment.js"));
861
- }
716
+ this._blurPostProcessY = new PostProcess("SSRblurY", ThinSSRBlurPostProcess.FragmentUrl, {
717
+ uniformNames: ThinSSRBlurPostProcess.Uniforms,
718
+ samplerNames: ThinSSRBlurPostProcess.Samplers,
719
+ size: 1 / (this.blurDownsample + 1),
720
+ samplingMode: 2,
721
+ engine,
722
+ textureType: this._textureType,
723
+ effectWrapper: this._thinSSRRenderingPipeline._ssrBlurYPostProcess,
862
724
  });
863
725
  this._blurPostProcessY.autoClear = false;
864
- this._blurPostProcessY.onApplyObservable.add((effect) => {
865
- const height = this._blurPostProcessY?.inputTexture.height ?? this._scene.getEngine().getRenderHeight();
866
- effect.setFloat2("texelOffsetScale", 0, this._blurDispersionStrength / height);
726
+ this._blurPostProcessY.onApplyObservable.add(() => {
727
+ this._thinSSRRenderingPipeline._ssrBlurYPostProcess.textureWidth = 1; // not used
728
+ this._thinSSRRenderingPipeline._ssrBlurYPostProcess.textureHeight = this._blurPostProcessY?.inputTexture.height ?? this._scene.getEngine().getRenderHeight();
867
729
  });
868
- const uniformNames = ["strength", "reflectionSpecularFalloffExponent", "reflectivityThreshold"];
869
- const samplerNames = ["textureSampler", "mainSampler", "reflectivitySampler"];
870
- let defines = "";
871
- if (this._debug) {
872
- defines += "#define SSRAYTRACE_DEBUG\n";
873
- }
874
- if (this._inputTextureColorIsInGammaSpace) {
875
- defines += "#define SSR_INPUT_IS_GAMMA_SPACE\n";
876
- }
877
- if (this._generateOutputInGammaSpace) {
878
- defines += "#define SSR_OUTPUT_IS_GAMMA_SPACE\n";
879
- }
880
- if (this.useFresnel) {
881
- defines += "#define SSR_BLEND_WITH_FRESNEL\n";
882
- uniformNames.push("projection", "invProjectionMatrix", "nearPlaneZ", "farPlaneZ");
883
- samplerNames.push("depthSampler", "normalSampler");
884
- }
885
- if (this._useScreenspaceDepth) {
886
- defines += "#define SSRAYTRACE_SCREENSPACE_DEPTH";
887
- }
888
- if (this._reflectivityThreshold === 0) {
889
- defines += "#define SSR_DISABLE_REFLECTIVITY_TEST";
890
- }
891
- this._blurCombinerPostProcess = new PostProcess("SSRblurCombiner", "screenSpaceReflection2BlurCombiner", uniformNames, samplerNames, this._useBlur() ? 1 / (this._blurDownsample + 1) : 1, null, 1, engine, false, defines, this._textureType, undefined, undefined, undefined, undefined, this._scene.getEngine().isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */, (useWebGPU, list) => {
892
- if (useWebGPU) {
893
- list.push(import("../../../ShadersWGSL/screenSpaceReflection2BlurCombiner.fragment.js"));
894
- }
895
- else {
896
- list.push(import("../../../Shaders/screenSpaceReflection2BlurCombiner.fragment.js"));
897
- }
730
+ this._blurCombinerPostProcess = new PostProcess("SSRblurCombiner", ThinSSRBlurCombinerPostProcess.FragmentUrl, {
731
+ uniformNames: ThinSSRBlurCombinerPostProcess.Uniforms,
732
+ samplerNames: ThinSSRBlurCombinerPostProcess.Samplers,
733
+ size: 1 / (this.blurDownsample + 1),
734
+ samplingMode: 1,
735
+ engine,
736
+ textureType: this._textureType,
737
+ effectWrapper: this._thinSSRRenderingPipeline._ssrBlurCombinerPostProcess,
898
738
  });
899
739
  this._blurCombinerPostProcess.autoClear = false;
900
740
  this._blurCombinerPostProcess.onApplyObservable.add((effect) => {
@@ -916,11 +756,6 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
916
756
  const roughnessIndex = geometryBufferRenderer.getTextureIndex(GeometryBufferRenderer.REFLECTIVITY_TEXTURE_TYPE);
917
757
  effect.setTexture("reflectivitySampler", geometryBufferRenderer.getGBuffer().textures[roughnessIndex]);
918
758
  if (this.useFresnel) {
919
- const camera = this._scene.activeCamera;
920
- if (camera && this._useScreenspaceDepth) {
921
- effect.setFloat("nearPlaneZ", camera.minZ);
922
- effect.setFloat("farPlaneZ", camera.maxZ);
923
- }
924
759
  effect.setTexture("normalSampler", geometryBufferRenderer.getGBuffer().textures[1]);
925
760
  if (this._useScreenspaceDepth) {
926
761
  const depthIndex = geometryBufferRenderer.getTextureIndex(GeometryBufferRenderer.SCREENSPACE_DEPTH_TEXTURE_TYPE);
@@ -935,29 +770,12 @@ export class SSRRenderingPipeline extends PostProcessRenderPipeline {
935
770
  const roughnessIndex = prePassRenderer.getIndex(3);
936
771
  effect.setTexture("reflectivitySampler", prePassRenderer.getRenderTarget().textures[roughnessIndex]);
937
772
  if (this.useFresnel) {
938
- const camera = this._scene.activeCamera;
939
- if (camera && this._useScreenspaceDepth) {
940
- effect.setFloat("nearPlaneZ", camera.minZ);
941
- effect.setFloat("farPlaneZ", camera.maxZ);
942
- }
943
773
  const depthIndex = prePassRenderer.getIndex(this._useScreenspaceDepth ? 10 : 5);
944
774
  const normalIndex = prePassRenderer.getIndex(6);
945
775
  effect.setTexture("normalSampler", prePassRenderer.getRenderTarget().textures[normalIndex]);
946
776
  effect.setTexture("depthSampler", prePassRenderer.getRenderTarget().textures[depthIndex]);
947
777
  }
948
778
  }
949
- effect.setFloat("strength", this.strength);
950
- effect.setFloat("reflectionSpecularFalloffExponent", this.reflectionSpecularFalloffExponent);
951
- effect.setFloat("reflectivityThreshold", this._reflectivityThreshold);
952
- if (this.useFresnel) {
953
- const camera = this._scene.activeCamera;
954
- if (camera) {
955
- const projectionMatrix = camera.getProjectionMatrix();
956
- projectionMatrix.invertToRef(TmpVectors.Matrix[0]);
957
- effect.setMatrix("projection", projectionMatrix);
958
- effect.setMatrix("invProjectionMatrix", TmpVectors.Matrix[0]);
959
- }
960
- }
961
779
  });
962
780
  }
963
781
  /**
@@ -985,76 +803,73 @@ __decorate([
985
803
  ], SSRRenderingPipeline.prototype, "samples", null);
986
804
  __decorate([
987
805
  serialize()
988
- ], SSRRenderingPipeline.prototype, "maxDistance", void 0);
806
+ ], SSRRenderingPipeline.prototype, "maxDistance", null);
989
807
  __decorate([
990
808
  serialize()
991
- ], SSRRenderingPipeline.prototype, "step", void 0);
809
+ ], SSRRenderingPipeline.prototype, "step", null);
992
810
  __decorate([
993
811
  serialize()
994
- ], SSRRenderingPipeline.prototype, "thickness", void 0);
812
+ ], SSRRenderingPipeline.prototype, "thickness", null);
995
813
  __decorate([
996
814
  serialize()
997
- ], SSRRenderingPipeline.prototype, "strength", void 0);
815
+ ], SSRRenderingPipeline.prototype, "strength", null);
998
816
  __decorate([
999
817
  serialize()
1000
- ], SSRRenderingPipeline.prototype, "reflectionSpecularFalloffExponent", void 0);
818
+ ], SSRRenderingPipeline.prototype, "reflectionSpecularFalloffExponent", null);
1001
819
  __decorate([
1002
820
  serialize()
1003
- ], SSRRenderingPipeline.prototype, "maxSteps", void 0);
821
+ ], SSRRenderingPipeline.prototype, "maxSteps", null);
1004
822
  __decorate([
1005
823
  serialize()
1006
- ], SSRRenderingPipeline.prototype, "roughnessFactor", void 0);
824
+ ], SSRRenderingPipeline.prototype, "roughnessFactor", null);
1007
825
  __decorate([
1008
826
  serialize()
1009
- ], SSRRenderingPipeline.prototype, "selfCollisionNumSkip", void 0);
827
+ ], SSRRenderingPipeline.prototype, "selfCollisionNumSkip", null);
1010
828
  __decorate([
1011
829
  serialize()
1012
- ], SSRRenderingPipeline.prototype, "_reflectivityThreshold", void 0);
1013
- __decorate([
1014
- serialize("_ssrDownsample")
1015
- ], SSRRenderingPipeline.prototype, "_ssrDownsample", void 0);
830
+ ], SSRRenderingPipeline.prototype, "reflectivityThreshold", null);
1016
831
  __decorate([
1017
832
  serialize()
1018
833
  ], SSRRenderingPipeline.prototype, "ssrDownsample", null);
1019
834
  __decorate([
1020
835
  serialize("blurDispersionStrength")
1021
- ], SSRRenderingPipeline.prototype, "_blurDispersionStrength", void 0);
836
+ ], SSRRenderingPipeline.prototype, "blurDispersionStrength", null);
1022
837
  __decorate([
1023
838
  serialize("blurDownsample")
1024
- ], SSRRenderingPipeline.prototype, "_blurDownsample", void 0);
839
+ ], SSRRenderingPipeline.prototype, "blurDownsample", null);
1025
840
  __decorate([
1026
841
  serialize("enableSmoothReflections")
1027
- ], SSRRenderingPipeline.prototype, "_enableSmoothReflections", void 0);
842
+ ], SSRRenderingPipeline.prototype, "enableSmoothReflections", null);
1028
843
  __decorate([
1029
844
  serialize("environmentTexture")
1030
- ], SSRRenderingPipeline.prototype, "_environmentTexture", void 0);
845
+ ], SSRRenderingPipeline.prototype, "environmentTexture", null);
1031
846
  __decorate([
1032
847
  serialize("environmentTextureIsProbe")
1033
- ], SSRRenderingPipeline.prototype, "_environmentTextureIsProbe", void 0);
848
+ ], SSRRenderingPipeline.prototype, "environmentTextureIsProbe", null);
1034
849
  __decorate([
1035
850
  serialize("attenuateScreenBorders")
1036
- ], SSRRenderingPipeline.prototype, "_attenuateScreenBorders", void 0);
851
+ ], SSRRenderingPipeline.prototype, "attenuateScreenBorders", null);
1037
852
  __decorate([
1038
853
  serialize("attenuateIntersectionDistance")
1039
- ], SSRRenderingPipeline.prototype, "_attenuateIntersectionDistance", void 0);
854
+ ], SSRRenderingPipeline.prototype, "attenuateIntersectionDistance", null);
1040
855
  __decorate([
1041
856
  serialize("attenuateIntersectionIterations")
1042
- ], SSRRenderingPipeline.prototype, "_attenuateIntersectionIterations", void 0);
857
+ ], SSRRenderingPipeline.prototype, "attenuateIntersectionIterations", null);
1043
858
  __decorate([
1044
859
  serialize("attenuateFacingCamera")
1045
- ], SSRRenderingPipeline.prototype, "_attenuateFacingCamera", void 0);
860
+ ], SSRRenderingPipeline.prototype, "attenuateFacingCamera", null);
1046
861
  __decorate([
1047
862
  serialize("attenuateBackfaceReflection")
1048
- ], SSRRenderingPipeline.prototype, "_attenuateBackfaceReflection", void 0);
863
+ ], SSRRenderingPipeline.prototype, "attenuateBackfaceReflection", null);
1049
864
  __decorate([
1050
865
  serialize("clipToFrustum")
1051
- ], SSRRenderingPipeline.prototype, "_clipToFrustum", void 0);
866
+ ], SSRRenderingPipeline.prototype, "clipToFrustum", null);
1052
867
  __decorate([
1053
868
  serialize("useFresnel")
1054
- ], SSRRenderingPipeline.prototype, "_useFresnel", void 0);
869
+ ], SSRRenderingPipeline.prototype, "useFresnel", null);
1055
870
  __decorate([
1056
871
  serialize("enableAutomaticThicknessComputation")
1057
- ], SSRRenderingPipeline.prototype, "_enableAutomaticThicknessComputation", void 0);
872
+ ], SSRRenderingPipeline.prototype, "enableAutomaticThicknessComputation", null);
1058
873
  __decorate([
1059
874
  serialize("backfaceDepthTextureDownsample")
1060
875
  ], SSRRenderingPipeline.prototype, "_backfaceDepthTextureDownsample", void 0);
@@ -1066,12 +881,12 @@ __decorate([
1066
881
  ], SSRRenderingPipeline.prototype, "_isEnabled", void 0);
1067
882
  __decorate([
1068
883
  serialize("inputTextureColorIsInGammaSpace")
1069
- ], SSRRenderingPipeline.prototype, "_inputTextureColorIsInGammaSpace", void 0);
884
+ ], SSRRenderingPipeline.prototype, "inputTextureColorIsInGammaSpace", null);
1070
885
  __decorate([
1071
886
  serialize("generateOutputInGammaSpace")
1072
- ], SSRRenderingPipeline.prototype, "_generateOutputInGammaSpace", void 0);
887
+ ], SSRRenderingPipeline.prototype, "generateOutputInGammaSpace", null);
1073
888
  __decorate([
1074
889
  serialize("debug")
1075
- ], SSRRenderingPipeline.prototype, "_debug", void 0);
890
+ ], SSRRenderingPipeline.prototype, "debug", null);
1076
891
  RegisterClass("BABYLON.SSRRenderingPipeline", SSRRenderingPipeline);
1077
892
  //# sourceMappingURL=ssrRenderingPipeline.js.map