AmbientLight.fx (with dither toggle)

  • Posts: 3
3 years 1 week ago - 3 years 1 week ago #1 by SoZ
TL;DR: A version of Ganossa's AmbientLight.fx with a toggle to turn dithering off. Try it if you encounter diagonal lines running through your image.


I am completely new to ReShade and this is my first post here, so apologies in advance if I'm doing anything wrong. I've seen plenty of ReShade/SweetFX screenshots over the years but I hadn't looked into using ReShade before today. I wanted to make my screenshots a little more interesting, so I figured I would download it and give it a go.

After an hour or so of fiddling, I am very happy with the results, but the AmbientLight.fx shader was introducing a pattern of diagonal lines running through the image. Unable to find any mention of the issue on this forum, I traced the source of the pattern back to the "dither" code within the shader. Funnily enough, determining the origin of the problem gave me the keyword I had been missing to search for other posts on the topic on the forum, such as this one where Marty McFly had identified the cause of the problem previously: TOPIC: Shaders Problems

I have modified the version of AmbientLight.fx that was automatically downloaded when I installed ReShade earlier to allow dithering to be turned on and off via the AL_Dither toggle in the UI. It fixes my problem and I figured I would share the modification in case it's of use to anyone else. Hopefully there are no issues with sharing modifications to existing shaders that are already publicly available here; the forum rules weren't clear.

Regarding the dither code itself, not having used ReShade before, I am unsure whether or not it is working as intended. While it is technically a dither, the harsh pattern produced is very distracting. A more subtle pattern or random noise might produce a better result. Perhaps I'll experiment when I have more time.
The following user(s) said Thank You: Apocalypso, One3rd, andrew, Uncle Crassius, WalterDasTrevas, Exilium, Marty, Sinclair, Rudy102

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

  • Posts: 14
2 years 8 months ago #2 by One3rd
Thanks for this! That pattern had been bugging me for a while but I wasn't actually sure what was causing it. It had actually stopped me from using the AmbientLight shader in a number of situations due to this. The strange thing was it only showed up in some games and not all and I couldn't pin down why.

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

  • Posts: 20
9 months 3 weeks ago #3 by Diego0920

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

  • Posts: 40
8 months 3 weeks ago #4 by aaronth07
Thanks, testing it now.

You should consider submitting a pull request on Github, so that this can replace the normal ambient light.

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