microsoft / microsoft/DirectX-Graphics-Samples

D3D12HDR::EnsureSwapChainColorSpace gamma documentation

Open
#924 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
6.8k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/microsoft/DirectX-Graphics-Samples/blob/aacda21d0f625ef7d474e699adf63e0a422e0794/Samples/Desktop/D3D12HDR/src/D3D12HDR.cpp#L925

Comment mentions Gamma 2.2 in FP16:

// DirectX supports two combinations of swapchain pixel formats and colorspaces for HDR content.
// Option 1: FP16 + DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
// Option 2: R10G10B10A2 + DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020

Code sets Gamma 1.0 in FP16:

    case _16:
        colorSpace = DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709;
        m_rootConstants[DisplayCurve] = None;
        break;

Is it correct?

Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read Samples/Desktop/D3D12HDR/src/D3D12HDR.cpp around EnsureSwapChainColorSpace at line 925. Compare the FP16 comment mentioning Gamma 2.2 with the _16 case setting DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709. Done means establishing which value is correct and aligning the comment or code with that conclusion.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.