载入中...
搜索中...
未找到
DisplayOutputEncoding.h
浏览该文件的文档.
85 const float encodeSrgb = (!attachmentEncodesSrgb && space == ActiveColorSpace::Sdr) ? 65536.f : 0.f;
87 return Color(aces ? 1.f : 0.f, packActiveMode(space), packNits(paperWhiteNits, peakNits), encodeSrgb);
96 return Color(aces ? 1.f : 0.f, packComposeLinearMode(), packNits(paperWhiteNits, peakNits), 0.f);
100inline Color uiResolveTint(ActiveColorSpace space, float paperWhiteNits, float peakNits) noexcept {
138inline void encodeHdr10(float &r, float &g, float &b, float paperWhiteNits, float peakNits) noexcept {
178inline void encodeScRgb(float &r, float &g, float &b, float paperWhiteNits, float peakNits) noexcept {
float luminanceRec709(float r, float g, float b) noexcept
Luminance rec 709.
Definition DisplayOutputEncoding.h:107
bool isComposeLinearMode(float packed) noexcept
True when the tint G channel requests compose-linear (mode 3).
Definition DisplayOutputEncoding.h:77
ActiveColorSpace unpackActiveMode(float packed) noexcept
Decode the present mode from the resolve tint G channel.
Definition DisplayOutputEncoding.h:69
float linearToPq(float v) noexcept
Apply the ST.2084 PQ OETF to a [0,1] normalized luminance sample.
Definition DisplayOutputEncoding.h:122
void encodeHdr10(float &r, float &g, float &b, float paperWhiteNits, float peakNits) noexcept
Map filmic display-linear RGB (1 = paper white) into HDR10 PQ codes.
Definition DisplayOutputEncoding.h:138
Color uiResolveTint(ActiveColorSpace space, float paperWhiteNits, float peakNits) noexcept
Build the Color tint used when compositing SDR UI onto an HDR swapchain.
Definition DisplayOutputEncoding.h:100
float packComposeLinearMode() noexcept
Tint G value for compose-linear output (paper-white-relative, no OETF).
Definition DisplayOutputEncoding.h:66
Color sceneResolveTint(bool aces, ActiveColorSpace space, bool attachmentEncodesSrgb, float paperWhiteNits, float peakNits) noexcept
Build the Color tint used by the final scene present resolve.
Definition DisplayOutputEncoding.h:83
float packNits(float paperWhiteNits, float peakNits) noexcept
Pack paper-white and peak nits into one float for the present resolve tint.
Definition DisplayOutputEncoding.h:34
void clampCalibration(float &paperWhiteNits, float &peakNits) noexcept
Clamp paper-white / peak luminance into the engine-supported range.
Definition DisplayOutputEncoding.h:28
constexpr float kDefaultPeakNits
Definition DisplayOutputEncoding.h:25
void rec709ToRec2020(float &r, float &g, float &b) noexcept
Convert display-linear Rec.709 RGB into Rec.2020.
Definition DisplayOutputEncoding.h:112
constexpr float kDefaultPaperWhiteNits
Definition DisplayOutputEncoding.h:24
OutputMode
Requested present preference; Auto picks Hdr10 then ScRgb then Sdr.
Definition DisplayOutputEncoding.h:15
ActiveColorSpace
Active present color encoding after swapchain selection.
Definition DisplayOutputEncoding.h:12
void unpackNits(float packed, float &paperWhiteNits, float &peakNits) noexcept
Unpack paper-white and peak nits from the present resolve tint channel.
Definition DisplayOutputEncoding.h:43
Color sceneComposeTint(bool aces, float paperWhiteNits, float peakNits) noexcept
Build the Color tint for tonemapping into a linear HDR compose target.
Definition DisplayOutputEncoding.h:94
float packActiveMode(ActiveColorSpace space) noexcept
Encode the active present mode into the resolve tint G channel.
Definition DisplayOutputEncoding.h:53
void acesToDisplayLinear(float &r, float &g, float &b, float paperWhiteNits, float peakNits) noexcept
Expand ACES [0,1] output into display-linear relative to paper white.
Definition DisplayOutputEncoding.h:157
void encodeScRgb(float &r, float &g, float &b, float paperWhiteNits, float peakNits) noexcept
Map paper-white-relative display-linear RGB into scRGB (1.0 = 80 nits).
Definition DisplayOutputEncoding.h:178
eve::Color Color
RGBA color used by every graphics draw call. Lives inside eve::graphics so including a graphics heade...
Definition Color.h:13