티스토리 뷰

http://egloos.zum.com/wrice/v/5388456

http://www.stylezineblog.com/3446

BT2020: 국제 방송 표준단체인 ITU에 권고한 4K/UHD의 규격으로써, Rec.2020으로도 부른다. 4K/UHD의 규격 사항으로 해상도(3840/4096x2160), 프레임 레이트, 색공간 등 다양한 내용들이 있지만, 주로 4K/UHD 색공간의 의미로 많이 사용된다. 참고로 HD 지원 색공간은 BT.709이다.

http://www.itworld.co.kr/tags/68398/Rec.2020/99144

// This is the new HDR transfer function, also called "PQ" for perceptual quantizer.  Note that REC2084
// does not also refer to a color space.  REC2084 is typically used with the REC2020 color space.

다시 엔진으로, 최종 이미지는 화면에 복사된다

이 최종 이미지는 Linear RGB 이므로 모니터를 고려해서 왜곡을 다시 넣어준다

float3 LinearRGB = RemoveDisplayProfile(Color
Tex[(int2)position.xy], LDR_COLOR_FORMAT);
return ApplyDisplayProfile(LinearRGB, DISPLAY_PLANE_FORMAT);

image import 할 때 linear RGB로 바꾸지 않았기에 texture는 왜곡이 누적되어

밝은 색으로 가버린다

보통은 일반 색을 그냥 쓰는 경우도 없겠지만, 여기서는 배경을 대신해서 color를 쓰기에 하늘색도 좀더 하얗게 변해버렸다.

https://www.w3.org/Graphics/Color/srgb

내가 눈으로 모니터색을 선택 한 것이기에 SRGB를 색에서 제거 DirectXTk 의 texture load 함수는 srgb 지원하므로 flag 추가

g_SceneColorBuffer.SetClearColor( Color(DirectX::Colors::CornflowerBlue).FromSRGB() );

UINT loadFlag = DirectX::WIC_LOADER_FORCE_SRGB;
DirectX::CreateWICTextureFromMemoryEx( Graphics::g_Device,
(uint8_t*)(filePtr), fileSize, 0, D3D11_USAGE_DEFAULT, 
D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET, 
0, D3D11_RESOURCE_MISC_GENERATE_MIPS, loadFlag, 
m_pResource.GetAddressOf(), SRV.GetAddressOf());

원래 색으로 돌아왔다.

'Game > Mini Engine' 카테고리의 다른 글

Mini engine porting (6) - FXAA  (0) 2017.06.02
Mini engine porting to DX11 (4) - Up sampler  (0) 2017.05.31
Mini engine porting (3)  (0) 2017.05.27
Mini Engine porting (2)  (0) 2017.05.27
Mini Engine porting (1)  (0) 2017.05.22
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크