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

HDR: What if we supported colors beyond the mortal realm? #17203

Open
lhecker opened this issue May 8, 2024 · 0 comments
Open

HDR: What if we supported colors beyond the mortal realm? #17203

lhecker opened this issue May 8, 2024 · 0 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Milestone

Comments

@lhecker
Copy link
Member

lhecker commented May 8, 2024

Ever since my DEC VT520 got that Boston Dynamics ColorVizion HD ULTRA upgrade, weird things have been happening. First I've been hearing some weird Austrian-English voice in the background and now my leather jacket and car keys are gone. For some reason my smart door won't open anymore and I'm locked in. Just today my printer has spat out a ransom message that reads "Big sRGB is a lie!". Apparently I'm only freed if we add some sort of HDR and extended color space support. Please send help!


Jokes aside, I think it'd be kind of funny if we supported scRGB with half-precision floats, just like what DWM uses for composition on HDR displays. That would allow us, either just for fun when defining colors in a theme, or maybe for dithering, to use fine grained floating point brightness values and chromaticity (color) values. That way we could finally ship an official "Barbie+" theme were all colors are pink but some are even pinker than the others. Here's what scRGB looks like, the white triangle is sRGB:

ScRGB svg
(Source)

This requires two changes:

  • Make the renderer HDR aware. This would probably also require a HDR setting menu similar to those found in video games where, at a minimum, the paper white brightness can be configured.
    All relevant documentation can be found here: https://learn.microsoft.com/en-us/windows/win32/direct3darticles/high-dynamic-range#setting-up-your-directx-swap-chain
  • Get rid of til::color in most places inside WT as it's limited to sRGB. It's just fine for VT related code or code based around COLORREF, however. The settings model needs a color struct that can represent any arbitrary space and gamut in order to not be tied down to any particular representation. The render can then convert it losslessly to scRGB floats. This also avoids loss during blending.
@lhecker lhecker added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label May 8, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 8, 2024
@carlos-zamora carlos-zamora added this to the Backlog milestone May 8, 2024
@carlos-zamora carlos-zamora added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

2 participants