Blinue / Magpie

An all-purpose window upscaler for Windows 10/11.
GNU General Public License v3.0
9.5k stars 492 forks source link

RGB based NNEDI3 #999

Open Freestalkerdotfr opened 1 month ago

Freestalkerdotfr commented 1 month ago

Expected behavior 预期的功能

Hello, it would be nice to have an RGB based NNEDI3 upscaler. Is there a way that you do it or is there a way that I can do it myself ? I ask because the chroma part isn't properly upscaled, it result in color bleed, where in Libretro they get better chroma with the RGB based shader. https://docs.libretro.com/shader/nnedi3/ Thank you for your future inputs. Edit : I can use the 256 neuron version Edit 2 : I tried to use FSR and FSRCNNX but they have artifacts compared to NNEDI3 Luma, and NNEDI RGB will remove chroma artifacts where FSR based upscaler will make artifacts no matter what

Alternative behavior (optional) 近似的功能(可选)

No response

hauuau commented 1 month ago

I'm not quite sure if it's worth it. Weights in NNEDI3 are probably not optimal for RGB processing anyway.

But I managed to hack around a naive implementation. You could find it in the attached archive if you're willing to test it.

Note that processing performance takes at least 3x hit compared to the Luma version. Shader compilation unfortunately also takes an almost literal eternity even compared to already slow compilation of the Luma version.

NNEDI3_RGB.zip

Freestalkerdotfr commented 1 month ago

Thank you ! It took me a very long time to do the cache entry the first time I used the 256 neurons one, but the next time it will be instantaneous