Deband

More
1 year 11 months ago - 1 year 11 months ago #81 by JPulowski
Replied by JPulowski on topic Deband
Thanks for your review Duran.te . I'll try to improve the results in the meanwhile. The problem is finding the sweetspots for new thresholds, I am looking for ways to simplifying the whole process without giving users bunch of thresholds and scaring them away. By the way, even though Iterations and Range is comparable to the old version. Threshold's logic has been changed. So the old default setting of 0.004 now equals to 1.02 (i.e. 1.02 / 255.0). :)
Last edit: 1 year 11 months ago by JPulowski.

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

More
1 year 11 months ago - 1 year 11 months ago #82 by lowenz
Replied by lowenz on topic Deband
C:\ReShade 4\Shaders\Deband2.fx(86,15-31): warning X3553: can't use gradient instructions in loops with break, forcing loop to unroll
C:\ReShade 4\Shaders\Deband2.fx(136,2-13): error X3511: unable to unroll loop, loop does not appear to terminate in a timely manner (212 iterations) or unrolled loop is too large, use the [unroll(n)] attribute to force an exact higher number
Last edit: 1 year 11 months ago by lowenz.

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

More
1 year 11 months ago - 1 year 11 months ago #83 by lowenz
Replied by lowenz on topic Deband
Game is good old Commandos Strike Force (DX9).....it got the worst banding ever seen in games modern era :D
Last edit: 1 year 11 months ago by lowenz.

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

More
1 year 11 months ago #84 by JPulowski
Replied by JPulowski on topic Deband

lowenz wrote: C:\ReShade 4\Shaders\Deband2.fx(86,15-31): warning X3553: can't use gradient instructions in loops with break, forcing loop to unroll
C:\ReShade 4\Shaders\Deband2.fx(136,2-13): error X3511: unable to unroll loop, loop does not appear to terminate in a timely manner (212 iterations) or unrolled loop is too large, use the [unroll(n)] attribute to force an exact higher number

Seems due to changing tex2Dlod to tex2D. Thanks, will fix it in the next beta.
The following user(s) said Thank You: Enterprise24

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

More
1 year 11 months ago #85 by Enterprise24
Replied by Enterprise24 on topic Deband
I have the same error as lowenz. Game is The Sims 3 (DX9). Will wait for the fix. :woohoo:

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

More
1 year 11 months ago #86 by JPulowski
Replied by JPulowski on topic Deband
Okay, here is the new beta.

Changelog:
  • Added preset based basic setting and moved thresholds to advanced settings
  • Fixed the problem where for loops were unable to be unroll in d3d9
  • Added gradient angle checking (disabled by default)

I think the new thing is the gradient angle checking. From my limited testing, I did not see much benefit from it. It also causes a decrease in performance. Depending on your feedback I might remove it all together. It might be more efficient in video content and current parameters might not be optimized for video game content. Basically, when it detects a significant a gradient angle it boosts the thresholds for further debanding. Feel free to play with in addition to standard thresholds. (it is controlled by maximum angle and angle boost parameters)

I have also added madVR-like preset system. The current preset parameters are based on madshi's notes and do not reflect the final parameters. That actually depends on your feedback. So feel free to test them and tell me what do you think. You can also use "Custom" preset to input your own values in the advanced section. The default values in the advanced section are based on the medium preset by the way.

Again, if you encounter any bugs, errors or warnings feel free to let me know.

Warning: Spoiler!
The following user(s) said Thank You: Wicked Sick, Scorpio82CO, Viper_Joe, Marty, Duran.te, Enterprise24

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

More
1 year 11 months ago #87 by lowenz
Replied by lowenz on topic Deband
It's working now :)
The following user(s) said Thank You: JPulowski

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

More
1 year 11 months ago #88 by Enterprise24
Replied by Enterprise24 on topic Deband
Work for me also. Still try to find best setting for Sims 3.
Old deband have more strength but there is noticeably flicker from noise.
New deband cause much less flicker (on low setting - don't wan't to touch medium or higher since flicker is more noticeable).
The following user(s) said Thank You: JPulowski

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

More
1 year 11 months ago #89 by Scorpio82CO
Replied by Scorpio82CO on topic Deband
Doesn´t work for me in reshade 4.2.1, could you update the version??

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

More
1 year 11 months ago - 1 year 11 months ago #90 by JBeckman
Replied by JBeckman on topic Deband

Scorpio82CO wrote: Doesn´t work for me in reshade 4.2.1, could you update the version??


Do you have the ReShadeUI.fxh file?

#include "ReShadeUI.fxh"

From this new version of the shader.

github.com/crosire/reshade-shaders/blob/...haders/ReShadeUI.fxh
raw.githubusercontent.com/crosire/reshad...haders/ReShadeUI.fxh

That's accompanying ReShade.fxh now since a few changes back to the shader files but since Deband hasn't updated in some time it might still have been from before that change got added to the shader repository.

Unless ReShade.exe has a way to check for changes or you periodically re-download everything or manually check the shader Github repository it's very easy to miss changes to shader files even for core functionality such as this adjustment.


Just a suggestion, logger in the ReShade UI itself might have some additional info from breaking errors (red color.) to warnings (yellow color.) and perhaps more. :)
Last edit: 1 year 11 months ago by JBeckman.
The following user(s) said Thank You: Scorpio82CO

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

More
1 year 11 months ago - 1 year 11 months ago #91 by Duran.te
Replied by Duran.te on topic Deband
Alright, so: I did some further testing comparing every version.

Since pictures are worth a thousand words, here's some screenshots from Sekiro - Colours Band Twice:
(Yep, once again with over saturation)



Debanding Off




Old Debanding




First Beta Debanding




Updated Beta Debanding

Values are similar to default ones, with just few changes:
 - The Old Debanding Initial Radius has been changed from 16.000 to 24.000 like beta versions.
 - Threshold from Beta Debandings modified to 1.02
    (in the screenshot, I used the default "Low" strength preset with the updated version to show the new preset system behaviour)
 - Iterations of every version edited to 8 (2x max value) to better highlight the differences.

Huge fan of the new menu setting: The preset system is very intuitive and the Advanced line it's a definitely cleaner solution!

I've also tested the new gradient angle check trying to find out if there were significant difference with it on (except for performance decreasing :lol:) but with no luck, even by playing with different values or changing spot.
Last edit: 1 year 11 months ago by Duran.te.
The following user(s) said Thank You: JPulowski, Wicked Sick, Viper_Joe

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

More
1 year 11 months ago - 1 year 11 months ago #92 by JPulowski
Replied by JPulowski on topic Deband
Thank you for all of your feedback.

Here is the next beta, which is also the release candidate.
Changelog:
  • Removed gradient angle checking since it doesn't help with debanding, in the future i will probably replace it with a better suited local spatial frequency activity analysis function (e.g. contrast, uniformity, entropy etc.).
  • Cleaned up the code.
  • Added a new "Debug view" parameter which should help with determining range and iterations to make sure that the blurred image captures all the banding in the image.
At this stage I'd appreciate it if you guys could test the presets and also custom thresholds to give your idea about what each preset should be like. Remember that current values are based on feedback to madshi by the madVR community, so they are better suited towards video playback. I am pretty sure we can make some adjustments on them to make them more suitable for video game content.

Warning: Spoiler!
Last edit: 1 year 11 months ago by JPulowski.
The following user(s) said Thank You: Wicked Sick, BeTa, Viper_Joe, Marty, Marot

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

More
1 year 10 months ago - 1 year 10 months ago #93 by Duran.te
Replied by Duran.te on topic Deband
These values are pretty okayish.
An advice I could give, according to my experience, would be to boost up a little bit the dithering effect as, in many cases, just raising up each threshold is not enough to get rid of color banding without loosing too many details.

Also, it could be added an extra very high profile for all of those gradient-based games with excessive banding issue.
These are some few examples:

From top to bottom: Inside (2016) - Ibb & Obb (2014) - Necropolis (2016)


source: google images
Last edit: 1 year 10 months ago by Duran.te.

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

More
1 year 10 months ago - 1 year 10 months ago #94 by empleat
Replied by empleat on topic Deband
How do i install this, because reshade 4.3 no longer contains ReShade32.dll and than i can't inject it with ENBinjector.
I tried latest bundle, i found: reshade 1.1 + sweetfx 2.0 and it didn't worked, while default shaders did.
I highly increased treshold to 0.12 and nothing.
I added in - i don't know exactly how it called, there were values like this: USE_CARTOON 0.
So i simply wrote USE_DEBAND 1 - that's how i named my shader and i pressed scroll lock and it said it is on so.
No idea why it didn't worked.
Last edit: 1 year 10 months ago by empleat.

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

More
1 year 10 months ago - 1 year 10 months ago #95 by lowenz
Replied by lowenz on topic Deband
ReShade 4.3 of course contains the 32 bit version...
Last edit: 1 year 10 months ago by lowenz.

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

More
1 year 10 months ago #96 by empleat
Replied by empleat on topic Deband
? There is no dll file...

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

More
1 year 10 months ago #97 by lowenz
Replied by lowenz on topic Deband

empleat wrote: ? There is no dll file...

CTRL+click and you'll get the DLLs (ReShade32.dll + ReShade64.dll)

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

More
1 year 10 months ago - 1 year 10 months ago #98 by JPulowski
Replied by JPulowski on topic Deband
Deband 2.0 is now public. Enjoy. :)

Duran.te wrote: These values are pretty okayish.
An advice I could give, according to my experience, would be to boost up a little bit the dithering effect as, in many cases, just raising up each threshold is not enough to get rid of color banding without loosing too many details.

Also, it could be added an extra very high profile for all of those gradient-based games with excessive banding issue.

Thanks for your feedback. It doesn't have anything to do with dithering. Dithering is already optimized for 8 bpc output. The problem is current implementation is static which means for every region the shader applies the same thresholds. Which is why you either have too much debanding or it's good but still some banding remains. In order to overcome that I need to apply a spatial frequency analysis function to moderate thresholds. Current version only has additional sanity checking compared to the previous ones, but the thresholds themselves are still static, they are not adapting to the image content (gradient vs. texture). I am already reviewing some known methods and will push an update once I have the time to develop a prototype, again I will share it here first, then will make it public. Also feel free to suggest values for the very high preset.
Last edit: 1 year 10 months ago by JPulowski.
The following user(s) said Thank You: Viper_Joe

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

More
1 year 10 months ago #99 by empleat
Replied by empleat on topic Deband
I was trying 33th post from crossire: reshade.me/forum/shader-presentation/768-deband?start=20
Because it is more simple and i put into mpc folder ReShade32.dll and Deband.h file and which i renamed to <a class="bbcode_url" href="http://Reshade.fx" target="_blank" rel="nofollow noopener noreferrer">Reshade.fx</a> . Still not working.
I used reshade 2.0 there is a link at first post on site 1.

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

More
1 year 10 months ago - 1 year 10 months ago #100 by JPulowski
Replied by JPulowski on topic Deband
ReShade 2.0 is not supported. There has been few changes in ReShade's API during the development, which made backwards compatibility no longer possible. I only support the latest publicly available version that is available at the time. But the code itself should be compatible with regular HLSL which means it can be can be ported to MPC-HC or ReShade 2.0. Also if you are using MPC-HC, feel free to give madVR a try. The deband algorithm must be pretty much the same.
Last edit: 1 year 10 months ago by JPulowski.

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