Welcome, Guest.
Username: Password: Remember me

TOPIC: SmartNoise.fx - another approach for grain shaders

SmartNoise.fx - another approach for grain shaders 2 months 3 weeks ago #1

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". [Temporal Noise Demo]
Fixed pattern noise shaders, which are never changing the noise pattern,
are very noticeable when the "image is moving". [Fixed Pattern Noise Demo]
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]

Generally speaking noise/grain shaders can be used to add "fake details" to low res or little detailed textures and help to mask color banding.

Final Fantasy IX zoomed without SmartNoise:

Final Fantasy IX zoomed with SmartNoise:


SmartNoise.fx Code:
Warning: Spoiler! [ Click to expand ]
Last Edit: 2 weeks 3 days ago by Bapho. Reason: code updated
The administrator has disabled public write access.
The following user(s) said Thank You: Wicked Sick, jas01, acknowledge, Tojkar, Marot, SpajdrEX

SmartNoise.fx - another approach for grain shaders 2 months 2 days ago #2

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.
Last Edit: 2 months 2 days ago by Tojkar.
The administrator has disabled public write access.
The following user(s) said Thank You: Bapho

SmartNoise.fx - another approach for grain shaders 2 weeks 4 days ago #3

@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 administrator has disabled public write access.
The following user(s) said Thank You: acknowledge

SmartNoise.fx - another approach for grain shaders 2 weeks 1 day ago #4

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.
The administrator has disabled public write access.