Add colour profiles and brightness, contrast, saturation and gamma for the picture

Issue #136. With TOTK_COLOR_* away from their defaults, present_image runs one compute pass (vk_color.c, shaders/color_grade.comp) that writes the game picture's crop, adjusted, into an RGBA16F image, and FSR 1 or the blit scale that one; at the defaults nothing runs. The Screen tab gets a Colour group: a profile (Game's own, Vivid, Clarity, Custom) that sets the four values, and the four sliders. The adjustment, its order, ranges and presets are STS78721's patch from the issue, reworked onto dev: it now applies with FSR 1 scaling as well as the blit, its menu texts come from the catalog in English and Russian, and the patch's unused accessors and build_game.py change are left out.

Co-authored-by: STS78721 <134802927+STS78721@users.noreply.github.com>
This commit is contained in:
Lucas-blip-pngandSTS78721 committed 2026-10-31 10:02:16 -04:00
1 parent 7d62cbfa85
commit c0567191f0
10 files changed
+382 -7

No files matched your search

+31
View File
@@ -69,6 +69,21 @@ static const char *const text_en[UI_TEXT_COUNT] = {
[UI_MENU_ASPECT_FIT] = "Black bars", [UI_MENU_ASPECT_STRETCH] = "Stretch",
[UI_MENU_SHARPNESS] = "FSR sharpness",
[UI_MENU_SHARPNESS_DESC] = "Sharpening after FSR scaling; 0 turns it off.",
[UI_MENU_COLOR] = "Colour",
[UI_MENU_COLOR_PRESET] = "Colour profile",
[UI_MENU_COLOR_PRESET_DESC] = "Sets the four values below. Vivid: more contrast and saturation, shadows opened a "
"little (made for OLED screens). Clarity: a little more contrast, saturation and "
"brightness. Moving a value makes the profile Custom. The HUD changes with the picture; "
"this menu does not.",
[UI_MENU_COLOR_DEFAULT] = "Game's own", [UI_MENU_COLOR_VIVID] = "Vivid (OLED)", [UI_MENU_COLOR_CLARITY] = "Clarity",
[UI_MENU_COLOR_CUSTOM] = "Custom",
[UI_MENU_COLOR_BRIGHTNESS] = "Brightness", [UI_MENU_COLOR_BRIGHTNESS_DESC] = "Added to every colour; 0 leaves it.",
[UI_MENU_COLOR_CONTRAST] = "Contrast",
[UI_MENU_COLOR_CONTRAST_DESC] = "Spreads colours away from mid-grey (above 100 %) or towards it; 100 % leaves them.",
[UI_MENU_COLOR_SATURATION] = "Saturation",
[UI_MENU_COLOR_SATURATION_DESC] = "Colour strength against grey; 100 % leaves it.",
[UI_MENU_COLOR_GAMMA] = "Gamma",
[UI_MENU_COLOR_GAMMA_DESC] = "Below 1 brightens dark and middle tones, above 1 darkens them; 1 leaves them.",
[UI_MENU_FPS_LIMIT] = "Frame rate limit",
[UI_MENU_FPS_LIMIT_DESC] = "The most frames per second the game draws. Above 60 is experimental and needs Game speed "
@@ -314,6 +329,22 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
[UI_MENU_ASPECT_FIT] = "Чёрные полосы", [UI_MENU_ASPECT_STRETCH] = "Растянуть",
[UI_MENU_SHARPNESS] = "Резкость FSR",
[UI_MENU_SHARPNESS_DESC] = "Повышение резкости после масштабирования FSR; 0 выключает его.",
[UI_MENU_COLOR] = "Цвет",
[UI_MENU_COLOR_PRESET] = "Цветовой профиль",
[UI_MENU_COLOR_PRESET_DESC] = "Задаёт четыре значения ниже. «Яркий»: больше контраста и насыщенности, тени немного "
"светлее (для OLED-экранов). «Чёткость»: немного больше контраста, насыщенности и "
"яркости. Изменение любого значения делает профиль «Своим». Интерфейс игры меняется "
"вместе с картинкой, это меню — нет.",
[UI_MENU_COLOR_DEFAULT] = "Как в игре", [UI_MENU_COLOR_VIVID] = "Яркий (OLED)", [UI_MENU_COLOR_CLARITY] = "Чёткость",
[UI_MENU_COLOR_CUSTOM] = "Свой",
[UI_MENU_COLOR_BRIGHTNESS] = "Яркость", [UI_MENU_COLOR_BRIGHTNESS_DESC] = "Прибавляется к каждому цвету; 0 — без изменений.",
[UI_MENU_COLOR_CONTRAST] = "Контраст",
[UI_MENU_COLOR_CONTRAST_DESC] = "Отдаляет цвета от среднего серого (выше 100 %) или приближает к нему; 100 % — без "
"изменений.",
[UI_MENU_COLOR_SATURATION] = "Насыщенность",
[UI_MENU_COLOR_SATURATION_DESC] = "Сила цвета относительно серого; 100 % — без изменений.",
[UI_MENU_COLOR_GAMMA] = "Гамма",
[UI_MENU_COLOR_GAMMA_DESC] = "Ниже 1 осветляет тёмные и средние тона, выше 1 затемняет их; 1 — без изменений.",
[UI_MENU_FPS_LIMIT] = "Ограничение частоты кадров",
[UI_MENU_FPS_LIMIT_DESC] = "Наибольшее число кадров в секунду. Выше 60 — экспериментальный режим, нужна «Скорость "