SmartNoise.fx - another approach for grain shaders

  • Bapho
  • Topic Author
More
4 years 5 months ago - 4 years 4 days ago #1 by Bapho SmartNoise.fx - another approach for grain shaders was created 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!
Last edit: 4 years 4 days ago by Bapho. Reason: code updated
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.

  • Tojkar
More
4 years 4 months ago - 4 years 4 months ago #2 by Tojkar Replied by Tojkar on topic SmartNoise.fx - another approach for grain shaders
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: 4 years 4 months ago by Tojkar.
The following user(s) said Thank You: Bapho

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

  • Bapho
  • Topic Author
More
4 years 3 months ago #3 by Bapho Replied by Bapho on topic SmartNoise.fx - another approach for grain shaders
@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.

  • Tojkar
More
4 years 3 months ago #4 by Tojkar Replied by Tojkar on topic SmartNoise.fx - another approach for grain shaders
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.

  • Bapho
  • Topic Author
More
4 years 5 days ago - 4 years 5 days ago #5 by Bapho Replied by Bapho on topic SmartNoise.fx - another approach for grain shaders
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):
Last edit: 4 years 5 days ago by Bapho.
The following user(s) said Thank You: acknowledge

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

  • Bapho
  • Topic Author
More
9 months 4 weeks ago - 9 months 4 weeks ago #6 by Bapho Replied by Bapho on topic SmartNoise.fx - another approach for grain shaders
I've updated the shader to remove the warning and renamed the texture to bapho_blue_noise.png to avoid any collusion with other shaders.
Here's the GitHub Link:  SmartNoise.fx

I'm also experimenting with some other types of noise effects but it's not in a release-able state yet 
Last edit: 9 months 4 weeks ago by Bapho.
The following user(s) said Thank You: Wicked Sick, YF

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

  • Wicked Sick
More
2 months 4 weeks ago #7 by Wicked Sick Replied by Wicked Sick on topic SmartNoise.fx - another approach for grain shaders
Failed to compile with 6.0 when I tried it.

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

  • Bapho
  • Topic Author
More
2 months 1 week ago #8 by Bapho Replied by Bapho on topic SmartNoise.fx - another approach for grain shaders
Have you downloaded the bapho_blue_noise.png texture? Or is it a different error message? It works for me on version 6

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.