What is the difference between ssrDownsample and blurDownsample?

Shouldn’t blurDownsample be used uniformly for reflection result texture blurring in the XY direction?

ssrDownsample is used to decrease the size of the texture in which the SSR is rendered, while blurDownsample is used to decrease the size of the textures used to blur the SSR effect.

A post-process texture is used as an output for the previous post-process. This is why ssrDownsample is used when creating the blurX post-process, because the post-process that precedes blurX is the SSR post-process.


It looks like it’s all for dealing with SSR reflection results? But ssrDownsample deals with the x direction, blurDownsample deals with the y direction.

Now the input of postProcessX is the SSR reflection result, and the input of postProcessY is the result of postProcessX? If my understanding is correct, why do we need to separate the two directions of blur? My original understanding was that ssrDownsample was to reduce the texture of the original scene of SSR, and blurDownsample was to reduce the texture of the SSR reflection result, but it doesn’t seem to be the case in implementation?

No, ssrDownsample is used to reduce the size of the texture where the SSR effect is generated, and blurDownsample is used to reduce the size of blur textures. The original scene is rendered at normal resolution.

It would probably be easier to understand by looking at a snapshot of Spector, you would see what sizes the different textures are.


Why do we need to blur in two directions instead of blurring in the XY direction at the same time?

That’s because it’s faster to do two passes than a single one in this case. See image processing - Why does the separable filter reduce the cost of computing the operator? - Signal Processing Stack Exchange or Separate your filters! Separability, SVD and low-rank approximation of 2D image processing filters | Bart Wronski for the explanation.


Thanks for your deep reply!