Posts

Showing posts with the label colorspace

How to do nothing in HDR

Image
Hi, Today's post is about how to do nothing in HDR. That's just a clickbait way of saying I want to transform an SDR/SRGB gamma encoded (hereafter referred to as just SDR) image such that it appears like an SDR image after PQ encoding. The buffer you'll retreive from an SDR swapchain on windows is precisely that: an SDR/SRGB gamma encoded texture. Essentially, I want to press the button that turns on HDR and see nothing  happen. This is useful because maybe you want to toggle or lerp between SDR/HDR, so that you can compare the two. In the HDR Injector , I need to do this because once I've created the HDR swapchain, windows doesn't want to go back to the SDR swapchain for some reason . Also, I need to be able to sample parts of the SDR backbuffer to determine which parts had UI on them, or if color grading/tonemapping/post-processing occurred. Why is this even a problem? As I mentioned in my previous posts, HDR images are encoded in a different way tha...

How to render to HDR displays on Windows 10

Image
Hey! If you missed it, yesterday I wrote an artisanal blogue poaste about a tool I am working on called the HDR injector . Today, I will write about how to present an HDR image in Windows. Some of this will be a summary of the talk by Evan Hart at GDC 2018. There are three steps, which I don't think are explained anywhere, except maybe within these ultra-rare DX12 samples that I had to catch midair from a hot tweet. Set your swapchain effect to DXGI_SWAP_EFFECT_FLIP_DISCARD . Emphasis on FLIP. The GDC talk above seems to think this isn't 100% required, but I couldn't get any HDR working without it. Set your swapchain buffer format to an HDR compatible backbuffer format. The ones that work for me are:  DXGI_FORMAT_R16G16B16A16_FLOAT and  DXGI_FORMAT_R10G10B10A2_UNORM , though I expect other formats might work. I haven't tested all of them. Depending on which format you picked in ( 2 ) you need to select the correct color space. If you  selected RGB...