Skip to content

[mod:doom2016] Add experimental Vulkan HDR support - #635

Draft
decoded-brain wants to merge 5 commits into
clshortfuse:mainfrom
decoded-brain:feat/doom2016
Draft

[mod:doom2016] Add experimental Vulkan HDR support#635
decoded-brain wants to merge 5 commits into
clshortfuse:mainfrom
decoded-brain:feat/doom2016

Conversation

@decoded-brain

@decoded-brain decoded-brain commented Aug 25, 2026

Copy link
Copy Markdown

Summary

  • Adds an experimental RenoDX HDR10 addon for the tested Steam and GOG Vulkan x64 builds of DOOM (2016).
  • Preserves the game's real pre-SDR scene carrier, authored post effects, and separately sampled GUI instead of inverse-tonemapping the completed SDR backbuffer.
  • Adds Vanilla, PsychoV-17/22/24/25/30, and RenoDRT pipelines with Peak, Game, UI, and neutral grading controls.
  • Gates native Vulkan replacements by the known shader CRCs and captured pipeline contracts rather than by executable name, size, or SHA-256.
  • Restores the effective Auto/Manual peak immediately when switching from Preset Off to a saved preset.

Supported profile

  • Steam app ID: 379720
  • GOG product ID: 1390579243
  • Executable: DOOMx64vk.exe
  • API/architecture: Vulkan x64
  • ReShade: >=6.8.0 <6.9.0 Full Add-On
  • Inspected GOG reference executable: 101,520,384 bytes, SHA-256 A32DF8FFA042090F14FE0A200F1C5D7DDDF9C947FAC223916C252F826F1ECF11
  • Steam Vulkan was user-tested successfully; an exact Steam executable SHA-256 was not recorded and is not required for activation.
  • OpenGL (DOOMx64.exe) is not supported.

Render path

  • Post-process fragment shader 0xF600527E exposes the linear scene plus bloom, lens, overlay, and authored color-grade work before the native SDR curve. The game writes this pass to full-resolution R11G11B10_FLOAT targets.
  • The replacement keeps the original inputs, descriptor layout, render pass, fixed-function state, entry point, and specialization contract, replacing only the fragment module through the captured native VkGraphicsPipelineCreateInfo.
  • Final fragment shader 0x49CBC37F receives scene and GUI separately. The replacement composites the premultiplied GUI in display-light space, applies the selected UI nits, limits the final scene with a hue-preserving soft peak gate, converts to BT.2020, and encodes ST2084/PQ.
  • DOOM renders against a compatible RGBA16F clone. The swapchain proxy is only a copy of the already encoded PQ value into the RGB10A2 HDR10 swapchain; it does not contain an inverse tonemap or another display mapper.
  • Native replacements are created only for recognized shader CRCs whose captured Vulkan pipeline state matches the required render pass, topology, stages, specialization layout, and descriptor contract. Unknown or incompatible pipelines remain native.
  • There is no executable identity gate, runtime executable hashing, or BCrypt dependency.

Tone mapping and settings

Tone-map pipelines are pre-created independently for:

  • Vanilla
  • PsychoV-17
  • PsychoV-22
  • PsychoV-24
  • PsychoV-25
  • PsychoV-30
  • RenoDRT

Settings include Auto/Manual Peak Brightness, Game Brightness, UI Brightness, exposure, highlights, shadows, contrast, saturation, highlight saturation, PsychoV cone response, exposure-anchor matching, and vanilla local-slope matching.

PsychoV-30 is derived from the supplied source recorded in the game-local provenance contract (01E075AB1E9FD79469E160FCD05F54277DE8B47C76CC3C4A425E4DAA7F164F58) and explicitly uses compression = 0. PsychoV-24/P25/P25-NRG retain their recorded RenoDX provenance and license notices.

Preset Off restores SDR/Vanilla, manual 203-nit neutral values, and neutral grading settings. Changing the Vulkan output mode still requires a game restart, but switching back to a saved preset now immediately recomputes the effective Auto/Manual peak without requiring the Peak slider to be moved.

Clean upstream history

This branch was replayed directly onto clshortfuse/renodx:main at 9aaa24e6e5a9ca5d71af94addcac630959d5a176.

  • 5 linear commits ahead, 0 behind at publication time
  • no merge commits
  • no commits or ancestry from feature/detroit-unified
  • no commits from marat569/renodx or the superseded PR [mod:dishonored2] Add RenoDX support #620 history
  • 36 changed files, limited to CMakeLists.txt, test/CMakeLists.txt, src/games/doom2016/**, and test/doom2016/**
  • no Graphify output, agent files, captures, binaries, SPIR-V dumps, or local workspace paths

The only shared functionality previously supplied by the Detroit branch was Vulkan-window peak detection. This PR keeps that DXGI monitor enumeration game-local, so it does not modify or depend on shared Detroit utility files. The Steam/GOG compatibility change removes only the executable identity gate and its BCrypt linkage; the shader CRC and native Vulkan pipeline-contract checks remain intact.

Automated validation

Configured from the clean upstream branch with Windows SDK 10.0.26100+, DXC 1.9.2602.17, Slang 2026.14.1, glslang 16.5.0, Vulkan SDK 1.4.357.0, and recursive submodules.

Builds:

cmake --preset clang-x64
cmake --build --preset clang-x64-debug --target doom2016 doom2016_tonemap_math_vulkan
cmake --build --preset clang-x64-release --target doom2016 doom2016_tonemap_math_vulkan

Focused DOOM tests:

Debug:   5/5 passed
Release: 5/5 passed

These cover source/provenance, Steam/GOG metadata/schema, the inspected GOG executable reference, ten embedded Vulkan SPIR-V interfaces/ABI, the absence of executable activation gates, the retained shader/pipeline gates, and the GPU tone-map math harness.

Shared regressions:

17/17 passed

These include D3D12/Vulkan resource-upgrade transfer for RGBA8/RGB10A2, clone/copy/bridge fallback, shader injection, Vulkan swapchain proxy barriers, and shader source compatibility.

git diff --check passed. All generated addon and test artifacts remain untracked.

Runtime evidence and boundary

The source implementation was tested with ReShade 6.8.0.2155 on the inspected GOG executable at 3440x1440. The log confirmed:

  • RGB10A2 swapchain and HDR10_ST2084
  • exact-native final-output replacement creation and execution
  • all seven post-process variants created and modes 0-6 executed
  • no ReShade errors, failed immediate submissions, Vulkan VUIDs, or device loss
  • stable gameplay, menu, HUD, tone-map switching, grading controls, and Auto/Manual peak response

Lilium captures followed the configured output peak, including approximately 998-1000 nits for the 1000-nit profile and approximately 3988 nits for a 4000-nit P30 profile.

A Steam user tested a Release probe in live gameplay with only the executable identity block bypassed and confirmed that HDR output and the addon controls work. The production commit removes that gate and its hashing dependency entirely while leaving the proven render shaders, replacement CRCs, pipeline validation, resources, barriers, and output path unchanged. Debug and Release builds plus all focused and shared regression tests pass after the change.

A complete Steam executable hash, fresh Steam ReShade log, and synchronized numeric capture set have not yet been archived in this PR, so it remains Draft.

Known limits

  • Support is experimental. The inspected GOG build and a Steam Vulkan build are tested; other revisions still require matching shader CRCs and native pipeline contracts.
  • Auto HDR and NVIDIA RTX HDR must be disabled.
  • Third-party implicit Vulkan capture/overlay layers should be disabled during validation of the HDR proxy.
  • VK_EXT_hdr_metadata is not enabled by the inspected device path, so explicit static HDR metadata is not currently published; RGB10A2/ST2084/PQ output is still used.
  • Output Mode and Preset Off require a restart to change the actual Vulkan swapchain format/color space.
  • PsychoV-25 currently runs at full resolution and remains provisional until its sustained performance gate is completed.
  • Gameplay HUD, menus, and startup were exercised; subtitles, automap, every loading transition, and every video path have not received exhaustive coverage.
  • UI Brightness works on the proven separately sampled GUI plane, but formal 203 nits ±5% UI measurement is still pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant