SmartNoise.fx - another approach for grain shaders

  • Posts: 5
8 months 1 week ago - 2 months 3 weeks ago #1 by Bapho
Hi guys,

I created this SmartNoise.fx Shader because i did not liked the the noise behaviour of most shaders.
Temporal noise shaders, which are changing the noise pattern every
frame, are very noticeable when the "image isn't moving".
Fixed pattern noise shaders, which are never changing the noise pattern,
are very noticeable when the "image is moving".
So i was searching a way to bypass those disadvantages. I used the unique position of the current
texture in combination with the color and depth to get a unique seed for the noise function.
The result is a noise pattern that is only changing when the color or depth of the position is changing.
[SmartNoise Demo]

UPDATE: please don't forget to download the bluenoise.png into your Textures directory

Final Fantasy IX zoomed without SmartNoise:

Final Fantasy IX zoomed with SmartNoise:


SmartNoise.fx Code:
Warning: Spoiler! [ Click to expand ]
The following user(s) said Thank You: Wicked Sick, jas01, acknowledge, Tojkar, aaronth07, Marot, SpajdrEX, rota34

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

  • Posts: 100
7 months 2 weeks ago - 7 months 2 weeks ago #2 by Tojkar
This shader is exellent but it has one curious problem. Sometimes it changes the screen to black.

The problem appears on Space pirates and zombies 2 which uses OpenGL renderer. The black screen is not random. When zooming the camera in the world map some zoom levels causes the problem. Zooming futher or back removes the black but it re-appears when going back to that particular zoom level. Also, in some zoom levels it's othervise working but if I hover my mouse on some map icons, the screen turns black but the problem disappears when I move the cursor away from the icon. The problem in both cases is also more frequent in high zoom levels and does not happen at all when not zooming or zooming only a little.

I'm using the latest version of ReShade.

I don't know enough about shaders to dig any deeper than that, but I can do some testing if you don't happen to own the game.
The following user(s) said Thank You: Bapho

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

  • Posts: 5
6 months 6 days ago #3 by Bapho
@Tojkar thanks for pointing out this bug.
I think i was able to fix two bugs but i did not tried it with Space Pirates and Zombies 2.
I'm not sure if this fixed your problem also.

here's the updated Version:
SmartNoise.fx
The following user(s) said Thank You: acknowledge

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

  • Posts: 100
6 months 3 days ago #4 by Tojkar
Sadly the problem wasn't fixed. Merely changed.

The artefact is not fully black anymore but rather high contrasted image. The problem also appears in RDR2 but a bit differently. Insted of turning the entire screen dark it only makes some random pattern square shaped artefacts. In RDR2 it only appears in menus so it does not make the game unplayable. This also confirms that its not a problem related to OpenGL.

I've tried this in a few different games but the problem only seems to appear in these two. That makes it a bit puzzling.

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

  • Posts: 5
2 months 3 weeks ago - 2 months 3 weeks ago #5 by Bapho
I just updated the shader and added a fixed pattern blue noise and a mix between the dynamic golden noise as an option so the noise pattern is even harder to spot to the human eye.

(please don't forget to download the bluenoise.png into your Textures directory)

Breath of Fire III zoomed without SmartNoise:


Breath of Fire III zoomed with SmartNoise (mixed golden and blue noise):
The following user(s) said Thank You: acknowledge

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