Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crt-lottes and pixellate now use hardware linearization #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johnnovak
Copy link

@johnnovak johnnovak commented May 12, 2022

Hey @tyrells, we have added support for sRGB textures and framebuffers for GLSL shaders in DOSBox Staging (see here). Shaders can now request these features via pragmas:

#pragma use_srgb_texture
#pragma use_srgb_framebuffer

The nice thing about this is that it's completely backwards compatible -- the shader compiler will always ignore these unknown pragmas, it's a pre-processor step in DOSBox Staging that looks for them.

We are definitely planning to merge this feature back upstream into the DOSBox SVN branch.

This PR updates all shaders in your repo that benefit from proper gamma-correct interpolation. I've tried to add it to all shaders that don't do their own linearisation (like most CRT shaders), but sadly they seem to be tuned for incorrect "sRGB space" interpolation so they look quite different and basically broken when things are done in the mathematically correct way. Because of this, I've just left them alone.

If you're interested, here are our discussions with before/after screenshots about why we introduced this feature in the first place, but I'm sure you're aware of all the reasons:

dosbox-staging/dosbox-staging#1627
dosbox-staging/dosbox-staging#1634

@johnnovak
Copy link
Author

Hey @tyrells, just another ping, would you be able to merge this? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant