Skip to content

Deblur Shaders

bloc97 edited this page May 29, 2020 · 8 revisions

Example (Degraded / Processed)

Files

Anime4K_Deblur_DoG.glsl
Anime4K_Deblur_Original.glsl
Anime4K_Deblur_CNN_M.glsl
Anime4K_Deblur_CNN_L.glsl

Description

Performs super-resolution. Decreases blur in an image with the expectation that it is degraded with a Gaussian kernel. Image size is left unchanged.

The recommended version to use is Anime4K_Deblur_DoG.glsl.

Related shaders

DTD Shader - A deblur shader with better perceptual quality.
Upscale+Deblur Shaders

Settings

Settings for Anime4K_Deblur_DoG.glsl, Anime4K_Deblur_CNN_M.glsl and Anime4K_Deblur_CNN_L.glsl.

#define STRENGTH 0.6 //De-blur proportional strength, higher is sharper. However, it is better to tweak BLUR_CURVE instead to avoid ringing.
#define BLUR_CURVE 0.6 //De-blur power curve, lower is sharper. Good values are between 0.3 - 1. Values greater than 1 softens the image;
#define BLUR_THRESHOLD 0.1 //Value where curve kicks in, used to not de-blur already sharp edges. Only de-blur values that fall below this threshold.
#define NOISE_THRESHOLD 0.001 //Value where curve stops, used to not sharpen noise. Only de-blur values that fall above this threshold.

Settings for Anime4K_Deblur_Original.glsl.

#define REFINE_STRENGTH 1 //Strength of edge refinement, good values are between 0.2 and 4

Special considerations

Any non-Gaussian degradation remaining on the image will be amplified. It is better to use other shaders first to reduce noise or other artifacts.

CNN_M and CNN_L variants may introduce small amounts of checkerboard artifacts due to the pixelshuffle layer and the low parameter count. This is usually unnoticeable under live conditions.

Clone this wiki locally