libretro / slang-shaders

213 stars 91 forks source link

Will Libretro use a 10-bit or 12-bit output framebuffer for shaders for video cards that support them? #569

Open anikom15 opened 2 months ago

anikom15 commented 2 months ago

I'm the lead developer of the Scanline Classic shader.

We are working on adding support for color spaces beyond sRGB, but for the best support of these spaces, we'd like to use 10- or 12-bit fixed point video card output whenever possible. This is important to prevent banding and other color degradation when using another color space beyond sRGB.

I believe the intermediate framebuffers for shader passes currently support 32-bit float framebuffers, so this is not an issue. The only concern is if the final framebuffer for display can support 10-bit or 12-bit fixed point already or is fixed to 8-bit.

If it's the latter, please keep this open and if possible perhaps point me to where I can find the current framebuffer code to see feasibility of updating for 10- or 12-bit support.

nfp0 commented 2 months ago

RetroArch supports HDR shaders, so I believe the final framebuffer supports at least 10-bit. You can take a look into the hdr folder on this repository.

These are only supported on Windows for now. But now that Linux also supports HDR, I'm hopeful they'll add support for them on the Linux version of RetroArch.

hizzlekizzle commented 2 months ago

AFAIK, linux does not support HDR in a general sense, but Valve has done work to make it function in their ecosystem.

nfp0 commented 2 months ago

@hizzlekizzle Support is getting more robust. I don't know the details, but with KDE 6 we now have the first major DE supporting HDR out of the box. https://planet.kde.org/xavers-blog-2023-12-18-an-update-on-hdr-and-color-management-in-kwin/

image