[Request] Gaussian Blur with Temporal Reprojection

  • canceralp
  • Topic Author
More
4 years 5 months ago #1 by canceralp [Request] Gaussian Blur with Temporal Reprojection was created by canceralp
Hi again,
This is my second crazy (and so brilliant) idea in 5 minutes. Could someone look at my example below and consider doing it?

As we know Gaussian Blur works by taking a pixel's all neighbours (that's a 3x3 cluster) and have their averages and apply it on top of the center pixel.

Here is my idea;
Let's say Gaussian Blur intensity is set to 0.500. Divide this by Square root 2 which is equal to 0.354.
Step 1: Frame 1: Gaussian Blur is calculated for the intensity of 0.354.
Step 2:The Resulting pixel value is saved. For the sake of example, let's say the result is 0, 0, 128 (Half blue).
Step 3: Frame 2: Gaussian Blur is calculated for the intensity of 0.354. Let's assume the result is 0, 128, 0 (Half Green)
Step 4: Frame 1's 0, 0, 128 value is added to the Frame 2's 0, 128, 0 value with the weight of 0.354. The result is = 0, 82, 45 (Green, but with a little blue in it).

The result: Frame 2's pixel has an averaging value whose data come both from spatial neighbour and previous neighbours. The blur amount is still 0.500 but that is achieved with the help of previous frame's values.

The idea continoues: Now imagine a "release" treshold value. If the difference is greater than a set threshold, then the shader doesn't blend the frames. We don't want our white stick man leaving a gray ghost walking in front of a black bacground =) That difference can be set as color or luma, I couldn't visualize it in my head TBH. You, code masters would know better than me..

Bonus idea: Number of the previous frames can be increased and their weights can be calculated according to Gaussian Bell Curve. Blending more than 4 frames wouldn't make any difference according to that, though. (If I'm correct, Gaussian values after 3rd neighbour gives diminishing returns)

After polishing with a sharpening filter, this can create a very good smoothing effect. Even some natural motion blur when moving fast. It will damn sure remove the pixel party which happens when one aims with his gun and every complex shaped object starts to go crazy just because the character is breathing.

Anyway, I hope someone agrees with me here and considers making the shader.
Thanks!

Please Log in or Create an account to join the conversation.

  • j4712
More
4 years 5 months ago #2 by j4712 Replied by j4712 on topic [Request] Gaussian Blur with Temporal Reprojection
what does Temporal Reprojection has to do with this idea?

Please Log in or Create an account to join the conversation.

  • canceralp
  • Topic Author
More
4 years 5 months ago #3 by canceralp Replied by canceralp on topic [Request] Gaussian Blur with Temporal Reprojection
Gaussian blur makes its blurring desicion with neighbour pixels. I prupose to include previous states of those pixels, too. It's not the same as tracking a pixel's movement among frames, just like a proper TAA implementation but it still can "ease" the color transition of the pixels among frames and reduce pixel crawling.

I recently notice, using gaussian blur on VSR/DSR and applying a clamped sharpening acts as a low pass filter and smooths extra "thin" details by reducing contrast in those areas.

That can introduce slightly over smoothed images and even act like a form of small motion blur, however could help with too aliased games like GTA V, Assassin's Creed Syndicate, Crysis 3 etc (mostly TXAA titles, as they tend to have too many artifacts by nature). These games have severe pixel crawling and requiere very hish DSR/VSR resolutions like 4x, which is not possible for performance reasons.

It also eliminates specular aliasing very well. Now, I thought "why not spread this into time domain by selectively blending a pixel's current value with previous values?".

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.