Skip to content

Request: Apple Extended Dynamic Range, use linear instead of gamma 2.2 rendering for ImageMetal (StoreTextureFloat16Rgba) #144

@AndrewKeYanzhe

Description

@AndrewKeYanzhe

hello_imgui's ImageMetal buffers (float16) are rendered with gamma 2.2 encoding. I would like to render it as linear.

I have modified the EDR demo code to show grayscale bars with float input linearly scaling from 0-1

https://github.com/AndrewKeYanzhe/hello_imgui_template/blob/grayscale-gamma2.2-demo-metal/hello_edr_og.mm

Digital color meter reads the middle bar as middle gray 127/128, which means that the ImageMetal buffer goes through gamma encoding. Linear float 0.5 (50 nits) would map to around 186 in gamma 2.2 encoded value.

Image

Pinging @wkjarosz , I'm assuming for HDRView you are not using HelloImGui::ImageMetal ? I see that your app shows HDR images without gamma issues. I would love to hear how you implemented this, if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions