Replace the enhanced HDR with a port of RenoDX's tone mapper.

The game's ACES tonemap shader gets a GLSL function linked into its SPIR-V where it clamps each channel: the game's SDR result upgraded to the HDR range by luminance and mapped to the display with the RenoDRT curve, exposure, highlights, shadows, contrast, saturation, highlight saturation, blowout, flare and hue correction. The settings reach it as four vec4 the support buffer gains at 1440. The present encode is a port of the swap chain pass: gamma correction, gamut compression, the peak clamp and PQ. Without an HDR10 swapchain the shader gives the game's own SDR picture; native HDR is unchanged.

The menu offers Off, RenoDX and Native, with gamma correction, the tone mapper and its grading rows. The shader build compiles sources marked "keep functions" without optimisation so their functions survive for the splice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tangerineturtle1
2026-11-09 06:06:07 -05:00
parent 778c55777d
commit 9e574f84ec
22 changed files with 1865 additions and 793 deletions

View File

@@ -111,9 +111,33 @@ static const char *const text_en[UI_TEXT_COUNT] = {
[UI_MENU_HDR_GAME_DESC] = "Brightness of white in the game, in nits.",
[UI_MENU_HDR_UI] = "HUD and menu brightness",
[UI_MENU_HDR_UI_DESC] = "Brightness of the HUD and this menu, in nits.",
[UI_MENU_HDR_HUE] = "Highlight hue correction",
[UI_MENU_HDR_HUE_DESC] = "Bright colours such as fire and sparks turn towards white as in the game's own SDR picture, "
"matching the light they cast; 0 keeps them fully saturated.",
[UI_MENU_HDR_HUE] = "Hue correction",
[UI_MENU_HDR_HUE_DESC] = "How much bright colours keep the hue they have before the tone mapper; 0 lets them shift "
"as the curve takes them.",
[UI_MENU_HDR_GAMMA] = "Gamma correction",
[UI_MENU_HDR_GAMMA_DESC] = "Shows the picture as a 2.2 or BT.1886 (2.4) display would, as the game was made to be "
"seen; Off keeps the sRGB curve, with lighter shadows.",
[UI_MENU_HDR_TONEMAP] = "Tone mapper",
[UI_MENU_HDR_TONEMAP_DESC] = "Vanilla: the game's own curve at SDR brightness. RenoDRT: the game's look carried up "
"to your display's peak.",
[UI_MENU_HDR_EXPOSURE] = "Exposure",
[UI_MENU_HDR_EXPOSURE_DESC] = "Brightness of the whole picture before the tone mapper; 100 % leaves it unchanged.",
[UI_MENU_HDR_HIGHLIGHTS] = "Highlights",
[UI_MENU_HDR_HIGHLIGHTS_DESC] = "Brightness of the bright parts; 50 leaves them unchanged.",
[UI_MENU_HDR_SHADOWS] = "Shadows",
[UI_MENU_HDR_SHADOWS_DESC] = "Brightness of the dark parts; 50 leaves them unchanged.",
[UI_MENU_HDR_CONTRAST] = "Contrast",
[UI_MENU_HDR_CONTRAST_DESC] = "Contrast around mid grey; 50 leaves it unchanged.",
[UI_MENU_HDR_SATURATION] = "Saturation",
[UI_MENU_HDR_SATURATION_DESC] = "Strength of all colours; 50 leaves it unchanged.",
[UI_MENU_HDR_HIGHLIGHT_SAT] = "Highlight saturation",
[UI_MENU_HDR_HIGHLIGHT_SAT_DESC] = "Strength of the colours of the brightest parts; 50 leaves it unchanged.",
[UI_MENU_HDR_BLOWOUT] = "Blowout",
[UI_MENU_HDR_BLOWOUT_DESC] = "Turns the brightest parts towards white; 0 keeps their colour.",
[UI_MENU_HDR_FLARE] = "Flare",
[UI_MENU_HDR_FLARE_DESC] = "Lifts the darkest parts as a little stray light would; 0 keeps black black.",
[UI_MENU_HDR_GRADE] = "Colour grading",
[UI_MENU_HDR_GRADE_DESC] = "How much of the game's own colour grading the HDR picture keeps; 0 is the scene without it.",
[UI_MENU_SHADOW_SCALE] = "Shadow resolution",
[UI_MENU_SHADOW_SCALE_DESC] = "Sharper shadows. Higher costs more GPU power.",
[UI_MENU_PCSS] = "Soft shadows",
@@ -489,7 +513,7 @@ static const char *const text_en[UI_TEXT_COUNT] = {
[UI_MENU_FRAMEGEN] = "Frame generation",
[UI_MENU_FRAMEGEN_DESC] = "Adds generated frames for smoother motion. Needs DLSS or FSR 3.1.",
[UI_MENU_FRAMEGEN_OFF] = "Off",
[UI_MENU_HDR_ENHANCED] = "Enhanced", [UI_MENU_HDR_NATIVE] = "Native (the game's)",
[UI_MENU_HDR_TONEMAPPED] = "RenoDX", [UI_MENU_HDR_NATIVE] = "Native (the game's)",
[UI_MENU_FRAMEGEN_NOTE] = "needs DLSS or FSR 3.1",
[UI_MENU_FRAMEGEN_NEEDS] = "choose a DLSS or FSR 3.1 mode under Upscaling first",
[UI_MENU_FRAMEGEN_NEEDS_FSR] = "choose an FSR 3.1 mode under Upscaling first",
@@ -588,9 +612,33 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
[UI_MENU_HDR_GAME_DESC] = "Яркость белого в игре, в нитах.",
[UI_MENU_HDR_UI] = "Яркость интерфейса и меню",
[UI_MENU_HDR_UI_DESC] = "Яркость интерфейса и этого меню, в нитах.",
[UI_MENU_HDR_HUE] = "Коррекция оттенка бликов",
[UI_MENU_HDR_HUE_DESC] = "Яркие цвета (огонь, искры) уходят к белому, как в SDR-картинке игры, и совпадают со светом, "
"который они дают; 0 оставляет их полностью насыщенными.",
[UI_MENU_HDR_HUE] = "Коррекция оттенка",
[UI_MENU_HDR_HUE_DESC] = "Насколько яркие цвета сохраняют оттенок, который был до тональной кривой; при 0 они "
"смещаются вместе с кривой.",
[UI_MENU_HDR_GAMMA] = "Коррекция гаммы",
[UI_MENU_HDR_GAMMA_DESC] = "Показывает картинку так, как её показал бы экран с гаммой 2.2 или BT.1886 (2.4), для "
"которого игра делалась; «Выкл.» оставляет кривую sRGB с более светлыми тенями.",
[UI_MENU_HDR_TONEMAP] = "Тональная кривая",
[UI_MENU_HDR_TONEMAP_DESC] = "Vanilla: собственная кривая игры с яркостью SDR. RenoDRT: вид игры, доведённый до "
"пиковой яркости экрана.",
[UI_MENU_HDR_EXPOSURE] = "Экспозиция",
[UI_MENU_HDR_EXPOSURE_DESC] = "Яркость всей картинки до тональной кривой; 100 % оставляет её без изменений.",
[UI_MENU_HDR_HIGHLIGHTS] = "Света",
[UI_MENU_HDR_HIGHLIGHTS_DESC] = "Яркость светлых участков; 50 оставляет их без изменений.",
[UI_MENU_HDR_SHADOWS] = "Тени",
[UI_MENU_HDR_SHADOWS_DESC] = "Яркость тёмных участков; 50 оставляет их без изменений.",
[UI_MENU_HDR_CONTRAST] = "Контраст",
[UI_MENU_HDR_CONTRAST_DESC] = "Контраст вокруг среднего серого; 50 оставляет его без изменений.",
[UI_MENU_HDR_SATURATION] = "Насыщенность",
[UI_MENU_HDR_SATURATION_DESC] = "Сила всех цветов; 50 оставляет её без изменений.",
[UI_MENU_HDR_HIGHLIGHT_SAT] = "Насыщенность светов",
[UI_MENU_HDR_HIGHLIGHT_SAT_DESC] = "Сила цвета самых ярких участков; 50 оставляет её без изменений.",
[UI_MENU_HDR_BLOWOUT] = "Выгорание",
[UI_MENU_HDR_BLOWOUT_DESC] = "Уводит самые яркие участки к белому; 0 сохраняет их цвет.",
[UI_MENU_HDR_FLARE] = "Засветка",
[UI_MENU_HDR_FLARE_DESC] = "Приподнимает самые тёмные участки, как немного рассеянного света; 0 оставляет чёрное чёрным.",
[UI_MENU_HDR_GRADE] = "Цветокоррекция игры",
[UI_MENU_HDR_GRADE_DESC] = "Сколько собственной цветокоррекции игры сохраняет HDR-картинка; 0 — сцена без неё.",
[UI_MENU_SHADOW_SCALE] = "Разрешение теней",
[UI_MENU_SHADOW_SCALE_DESC] = "Более чёткие тени. Выше — больше нагрузка на видеокарту.",
[UI_MENU_PCSS] = "Мягкие тени",
@@ -1375,9 +1423,33 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
[UI_MENU_WALK_SCALE_DESC] = "A inclinação dos analógicos do teclado enquanto a tecla de andar está segura. Metade "
"é andar, a inclinação total é correr.",
[UI_MENU_OV_SCALE_DOWN] = "bilinear (nitidez FSR 0)",
[UI_MENU_HDR_HUE] = "Correção de matiz dos realces",
[UI_MENU_HDR_HUE_DESC] = "Cores fortes como fogo e faíscas vão para o branco como na imagem SDR do próprio jogo e "
"combinam com a luz que emitem; 0 as mantém totalmente saturadas.",
[UI_MENU_HDR_HUE] = "Correção de matiz",
[UI_MENU_HDR_HUE_DESC] = "Quanto as cores brilhantes mantêm o matiz que tinham antes da curva de tons; 0 deixa que "
"mudem com a curva.",
[UI_MENU_HDR_GAMMA] = "Correção de gama",
[UI_MENU_HDR_GAMMA_DESC] = "Mostra a imagem como uma tela de gama 2.2 ou BT.1886 (2.4) mostraria, como o jogo foi "
"feito para ser visto; Desligado mantém a curva sRGB, com sombras mais claras.",
[UI_MENU_HDR_TONEMAP] = "Curva de tons",
[UI_MENU_HDR_TONEMAP_DESC] = "Vanilla: a curva do próprio jogo, com brilho SDR. RenoDRT: o visual do jogo levado até "
"o pico da sua tela.",
[UI_MENU_HDR_EXPOSURE] = "Exposição",
[UI_MENU_HDR_EXPOSURE_DESC] = "Brilho de toda a imagem antes da curva de tons; 100 % a deixa como está.",
[UI_MENU_HDR_HIGHLIGHTS] = "Realces",
[UI_MENU_HDR_HIGHLIGHTS_DESC] = "Brilho das partes claras; 50 as deixa como estão.",
[UI_MENU_HDR_SHADOWS] = "Sombras",
[UI_MENU_HDR_SHADOWS_DESC] = "Brilho das partes escuras; 50 as deixa como estão.",
[UI_MENU_HDR_CONTRAST] = "Contraste",
[UI_MENU_HDR_CONTRAST_DESC] = "Contraste em torno do cinza médio; 50 o deixa como está.",
[UI_MENU_HDR_SATURATION] = "Saturação",
[UI_MENU_HDR_SATURATION_DESC] = "Força de todas as cores; 50 a deixa como está.",
[UI_MENU_HDR_HIGHLIGHT_SAT] = "Saturação dos realces",
[UI_MENU_HDR_HIGHLIGHT_SAT_DESC] = "Força das cores das partes mais claras; 50 a deixa como está.",
[UI_MENU_HDR_BLOWOUT] = "Estouro",
[UI_MENU_HDR_BLOWOUT_DESC] = "Leva as partes mais claras para o branco; 0 mantém a cor delas.",
[UI_MENU_HDR_FLARE] = "Flare",
[UI_MENU_HDR_FLARE_DESC] = "Ergue as partes mais escuras como um pouco de luz difusa faria; 0 mantém o preto preto.",
[UI_MENU_HDR_GRADE] = "Gradação de cor",
[UI_MENU_HDR_GRADE_DESC] = "Quanto da gradação de cor do próprio jogo a imagem HDR mantém; 0 é a cena sem ela.",
[UI_MENU_SHADOW_SCALE] = "Resolução das sombras",
[UI_MENU_SHADOW_SCALE_DESC] = "Sombras mais nítidas. Mais alto exige mais da placa de vídeo.",
[UI_MENU_SHADOW_RANGE] = "Alcance das cascatas de sombra",
@@ -1968,8 +2040,30 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = {
[UI_MENU_WALK_SCALE] = "步行幅度",
[UI_MENU_WALK_SCALE_DESC] = "按住步行键时键盘摇杆的推动幅度。一半为走路,推满为奔跑。",
[UI_MENU_OV_SCALE_DOWN] = "双线性(FSR 锐度 0)",
[UI_MENU_HDR_HUE] = "高光色调校正",
[UI_MENU_HDR_HUE_DESC] = "火焰、火花等明亮色彩像游戏自身的 SDR 画面一样趋向白色,与它们发出的光一致;0 保持完全饱和。",
[UI_MENU_HDR_HUE] = "色调校正",
[UI_MENU_HDR_HUE_DESC] = "明亮色彩保留色调映射前色调的程度;0 让它们随曲线偏移。",
[UI_MENU_HDR_GAMMA] = "伽马校正",
[UI_MENU_HDR_GAMMA_DESC] = "按游戏设计时的观看方式,以 2.2 或 BT.1886(2.4)显示器的效果呈现画面;关闭则保留 sRGB 曲线,暗部更亮。",
[UI_MENU_HDR_TONEMAP] = "色调映射",
[UI_MENU_HDR_TONEMAP_DESC] = "Vanilla:游戏自身的曲线,SDR 亮度。RenoDRT:把游戏的观感延伸到显示器的峰值亮度。",
[UI_MENU_HDR_EXPOSURE] = "曝光",
[UI_MENU_HDR_EXPOSURE_DESC] = "色调映射前整个画面的亮度;100 % 保持不变。",
[UI_MENU_HDR_HIGHLIGHTS] = "高光",
[UI_MENU_HDR_HIGHLIGHTS_DESC] = "明亮部分的亮度;50 保持不变。",
[UI_MENU_HDR_SHADOWS] = "阴影",
[UI_MENU_HDR_SHADOWS_DESC] = "暗部的亮度;50 保持不变。",
[UI_MENU_HDR_CONTRAST] = "对比度",
[UI_MENU_HDR_CONTRAST_DESC] = "中灰周围的对比度;50 保持不变。",
[UI_MENU_HDR_SATURATION] = "饱和度",
[UI_MENU_HDR_SATURATION_DESC] = "所有色彩的强度;50 保持不变。",
[UI_MENU_HDR_HIGHLIGHT_SAT] = "高光饱和度",
[UI_MENU_HDR_HIGHLIGHT_SAT_DESC] = "最亮部分的色彩强度;50 保持不变。",
[UI_MENU_HDR_BLOWOUT] = "过曝",
[UI_MENU_HDR_BLOWOUT_DESC] = "让最亮的部分趋向白色;0 保留其颜色。",
[UI_MENU_HDR_FLARE] = "眩光",
[UI_MENU_HDR_FLARE_DESC] = "像少量杂散光一样提亮最暗的部分;0 保持纯黑。",
[UI_MENU_HDR_GRADE] = "调色",
[UI_MENU_HDR_GRADE_DESC] = "HDR 画面保留游戏自身调色的程度;0 为不含调色的场景。",
[UI_MENU_SHADOW_SCALE] = "阴影分辨率",
[UI_MENU_SHADOW_SCALE_DESC] = "让阴影更清晰。越高越吃显卡。",
[UI_MENU_SHADOW_RANGE] = "阴影级联范围",