-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Home
Welcome to the Anime4K wiki!
Here you will find information about each specific shader included in Anime4K, their effects and their underlying algorithm.
All shaders fall in one or many of these specific categories:
For more details and visual comparisons, please follow the links.
-
Upscale shaders (Performs super-resolution. Increases (usually double) image size with the expectation that the low resolution image is artifact-free. I.e. No noise, blur or any other degradation.)
- High quality CNN shaders (M/L/UL variants)
- Fast DoG shader. It is effectively a repurposed deblur shader. We assume that bilinear upscaling is similar to a Gaussian kernel degradation. See deblur shaders section.
- The original Anime4K algorithm. Is also effectively a deblur shader but designed to handle the specific case of blur caused by bilinear upscaling.
-
Deblur shaders (Performs super-resolution. Decreases blur in an image with the expectation that it is degraded with a Gaussian kernel. Image size is left unchanged.)
- Difference of Gaussians (DoG) deblur shader. Performs non-linear residual enhancement with clamping to prevent overshoot. The power function used turns it from a simple sharpen filter to a deblur filter.
- The original Anime4K algorithm repurposed as a deblur shader. We assume that a Gaussian kernel degradation is similar to the blur produced by bilinear upscaling.
- CNN upscalers repurposed as a deblur shader (M/L variants). Similar to DoG but the residual is obtained using the CNNs.
- DTD shader (See mixed shaders section.)
- Mixed Upscale + Deblur CNN shaders (See mixed shaders section.)
-
Denoise shaders (Performs denoising. Decrease the noise level in an image. Different shaders have different expectation of the noise distribution.)
- Bilateral filters (Mean/Median/Mode variants) (Each is better at reducing a specific type of noise distribution and have different perceptual qualities.)
- Mixed Upscale + Denoise CNN shaders (See mixed shaders section.)
-
Resampling artifact removal shaders (Tries to reduce the magnitude of resampling artifacts caused by non-linear resampling. E.g. ringing, aliasing.)
- High quality CNN shaders (M/L/UL variants)
- Fast DoG variant (Might blur edges in lower resolution images.)
-
Perceptual enhancement shaders (Enhances perceptual quality by altering the image in some way.)
- Line thinning shader (Makes lines thinner. Good for older anime where lines are very thick when upscaled to 1080p or 4K.)
- Line darkening shader (Makes lines darker and increases contrast. Good alongside line thinning, as thinner lines might be very light.)
- DTD shader (See mixed shaders section.)
-
Mixed shaders (A shader containing a mix of the above for better performance or image quality.)
- The DTD shader (Short for Darken-Thin-Deblur shader) (Tries to restore perceptual quality of lines in blurry images by darkening lines, thinning them and then applying a deblur shader. This undoes what blur does to lines, since blur spreads lines out, thickens them and makes them lighter.)
- Upscale + Deblur (Computes the residual using the underlying algorithm, does super-resolution and then uses the same residual to deblur the image for free.)
- Upscale + Denoise (Upscaling CNNs trained with noisy images, thus they learned joint super-resolution and denoising.)
-
Joint bilateral upsampling (JBU Filter) for chroma
- Anime4K does not provide a guided chroma upsampling shader since a very good one already exists. The igv/KrigBilateral.glsl shader upscales the chroma channels using the luma channel as guide.