[DirectX 11] Gamma Correction

2021. 12. 18. 03:41·Graphics

Gamma Correction

- 일반적으로 Texture 데이터는 GammaEncode 되어서 저장되어 있으므로 Gamma Correction을 통해 Light 연산을 할 때에는

  Linear Space로 변환을 하여 연산을 해주어야 GammaDecode 상태로 색상이 출력 될 수 있다.

 

Gamma Encode 하는 이유

- 인간의 눈은 어두운 곳의 변화에 민감하고, 밝은 곳의 변화에는 둔감한 특징이 있다. 따라서 어두운 곳의 해상도를 높이고자 비선형

  함수를 사용하여 데이터를 저장한다.

 

Gamma Correction 방법

- 결과적으로 Gamma Encode된 Texture 데이터를 Linear Space로 변환. (pow(x, 2.2f))

- Linear Space에서 조명 연산과 Texture 혼합 연산.

- 최종 연산 결과를 다시 Gamma Encode 한다. (pow(x, 1/2.2f))

- 이후 모니터에 출력될 때 자동으로 Gamma Decode 된다.

 

Gamma Correction 주의점

- 모든 Texture가 모두 Gamma Correction이 필요한것은 아니다.

- Normal Map의 경우 선형 공간에서 출력해야 한다.

 

WithOut Gamma Correction

Gamma Correction 적용하지 않은 화면 출력.

 

With Gamma Correction

Gamma Correction 적용된 화면 출력.

'Graphics' 카테고리의 다른 글

[DirectX 11] Skinning Mesh  (0) 2021.12.18
[DirectX 11] Normal Mapping  (0) 2021.12.18
[DirectX 11] Deferred Rendering GBuffer  (0) 2021.12.14
[DirectX 11] Shadow Map  (0) 2021.12.14
[DirectX 11] Screen Space Ambient Occlusion  (0) 2021.12.14
'Graphics' 카테고리의 다른 글
  • [DirectX 11] Skinning Mesh
  • [DirectX 11] Normal Mapping
  • [DirectX 11] Deferred Rendering GBuffer
  • [DirectX 11] Shadow Map
KyuHwang
KyuHwang
  • KyuHwang
    DirectX Engine
    KyuHwang
  • 전체
    오늘
    어제
    • 분류 전체보기 (50)
      • C++ (4)
      • CS (0)
      • Graphics (32)
      • DLL (2)
      • Shader (7)
      • Project (4)
      • ETC (1)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

    • YouTube
  • 공지사항

  • 인기 글

  • 태그

    Shader Resource 관리
    std::enable_if
    Shader Reflection
    Implicit Linking
    Define Function
    Alpha Blending
    rigging chain
    Explicit Linking
    dll
    Win API
    Hash Code
    nvtt
    animation constraint
    bc format
    Define Macro
    mobile format
    hlsl
    DirectX 2D
    texture block compression
    animation retargeting
    RunTime Compile Shader
    Order Independent Transparency
    shader
    Directx11
    std::is_base_of
    C ++
    Project
    Return Type Operator
    Shader Macro
    DLL Interface
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
KyuHwang
[DirectX 11] Gamma Correction
상단으로

티스토리툴바