Giter Club home page Giter Club logo

Comments (9)

Tama47 avatar Tama47 commented on May 26, 2024 1

The best chain of shaders to get the highest quality would be to run through a VL or UL Restore Shader, then through a 2x or 4x Upscale Shader, and then run through a VL or UL Restore shader again. You could even try the UUL Restore Shader, but you might not be getting real-time performance anymore.

Here's an example:
glsl-shaders="~~/shaders/Anime4K_Clamp_Highlights.glsl;~~/shaders/Anime4K_Restore_CNN_UL.glsl;~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl;~~/shaders/Anime4K_Restore_CNN_VL.glsl"

from anime4k.

Tama47 avatar Tama47 commented on May 26, 2024 1

What is this autodownscale thing in the tutorial? Anime4K_AutoDownscalePre_x4.glsl

Downscale is done to make the shader faster. For example, if you upscale 1080p to 2160p and then run the restore shader again on the 2160p output, it will be very slow.

Like this:
1080p -> restore -> upscale x2 -> 2160p -> restore
Vs.
1080p -> restore -> upscale x2 -> 2160p -> downscale x2 -> 1080p -> restore

Or if you use x4:
1080p -> restore -> upscale x4 -> 4320p -> downscale x4 -> 1080p -> restore

The restore shader first fixes the bad stuff in anime, and then it is upscaled. Then it is downscaled to make the next restore shader work faster. This will keep the quality of the first restore, and then you run the restore shader again to get the highest quality.

Is it even needed?

Not necessarily, but it can make your shader run faster.

from anime4k.

arianaa30 avatar arianaa30 commented on May 26, 2024 1

I see..thanks for the info. I'll try your example above. If too slow maybe I should add the autodownscale option there.

from anime4k.

arianaa30 avatar arianaa30 commented on May 26, 2024

Cool. What is thais autodownscale thing in the tutorial?
Anime4K_AutoDownscalePre_x4.glsl

Is it even needed?

from anime4k.

AziRizvi avatar AziRizvi commented on May 26, 2024

Try your hand at my combos.

CTRL+6 osd-msg change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl;~~/shaders/Anime4K_Restore_CNN_UL.glsl;~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_UL.glsl;~~/shaders/Anime4K_Restore_CNN_VL.glsl;~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_UL.glsl"; show-text "Anime4K: (Restore UL) + Upscale Denoise (UL) + Restore (VL) + Upscale Denoise (UL)"

CTRL+7 osd-msg change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl;~~/shaders/Anime4K_Restore_CNN_UL.glsl;~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_UL.glsl;~~/shaders/Anime4K_Restore_CNN_VL.glsl;~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_UL.glsl;~~/shaders/Anime4K_Thin_HQ.glsl"; show-text "Anime4K: (Restore UL) + Upscale Denoise (UL) + Restore (VL) + Upscale Denoise (UL) + Thinlines"

CTRL+8 osd-msg change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl;~~/shaders/Anime4K_Restore_CNN_UL.glsl;~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_UL.glsl;~~/shaders/Anime4K_Restore_CNN_VL.glsl;~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_UL.glsl;~~/shaders/Anime4K_Darken_HQ.glsl"; show-text "Anime4K: (Restore UL) + Upscale Denoise (UL) + Restore (VL) + Upscale Denoise (UL) + Darklines"

from anime4k.

arianaa30 avatar arianaa30 commented on May 26, 2024

Cool. I will try these as well.
Should I put place this in mpv.conf or input?

from anime4k.

AziRizvi avatar AziRizvi commented on May 26, 2024

Cool. I will try these as well. Should I put place this in mpv.conf or input?

In input.conf.

Input.conf is for the Keybinds that you want to use MPV with, MPV.conf is for settings that you want to launch MPV with.
I had confusion too when I initially started out but it went away after a bit of research.

from anime4k.

arianaa30 avatar arianaa30 commented on May 26, 2024

Ok. So in your case, you do upscale twice, meaning it's actually a 4x upscale?

from anime4k.

AziRizvi avatar AziRizvi commented on May 26, 2024

Ok. So in your case, you do upscale twice, meaning it's actually a 4x upscale?

Yes, it's a 4x upscale, I think.
2x once and then 2x again, but I think it's also possible that it first upscales 2x and then gets downscaled and then gets upscaled again.

Now in the end, after all the upscaling is done, MPV downscales it back to the native resolution.
I'm not too sure about what is happening but I use these shader combinations because visually they look the best to me.

from anime4k.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.