Skip to content

[mod:welldweller] Add Well Dweller HDR mod - #706

Open
moistman7 wants to merge 4 commits into
clshortfuse:mainfrom
moistman7:mod/welldweller
Open

moistman7 wants to merge 4 commits into
clshortfuse:mainfrom
moistman7:mod/welldweller

Conversation

@moistman7

Copy link
Copy Markdown

What

New RenoDX mod for Well Dweller (GameMaker, D3D11).

  • Upgrades output-size RGBA8 render targets (application surface, LUT output, GUI composite) to RGBA16F so additive sprite highlights survive above 1.0.
  • Replaces the 64³ LUT colour-grade shader (0xBCCF990A):
    • Vanilla tone mapper clamps to the original RGBA8 range for parity.
    • HDR divides by the max channel before the LUT, so in-range pixels grade exactly as vanilla; ToneMapPass(untonemapped, graded_sdr, neutral_sdr) restores highlight range.
    • Negative values from subtractive blends are floored, as RGBA8 did.
  • Adds a Hue Shift Method setting (Vanilla Clip / ACES). Defaults: RenoDRT, ACES hue shift 100, Blowout 30.

Verification

  • Build: cmake --build --preset clang-x64-debug --target welldweller → renodx-welldweller.addon64.
  • DevKit: 1:1 baseline of 0xBCCF990A matched the original output CRC; the addon-sourced shader and RGBA16F upgrades are confirmed in snapshots; no NaN/Inf in LUT output.
  • In-game: sliders affect the scene, UI brightness stays separate, and Vanilla tone mapper matches the original.

🤖 Generated with Claude Code

reno and others added 2 commits October 15, 2026 21:51
GameMaker renders the scene, LUT grade and GUI into output-size RGBA8
surfaces. Upgrade them to RGBA16F so additive sprite highlights survive
above 1.0, and replace the LUT colour grade shader (0xBCCF990A):

- Vanilla tone mapper clamps to the original RGBA8 range for parity.
- HDR divides by the max channel before the 64^3 LUT so in-range pixels
  grade exactly as vanilla, then ToneMapPass restores highlight range.
- Negative values from subtractive blends are floored as RGBA8 did.

Add a Hue Shift Method setting (Vanilla Clip / ACES) and default to
RenoDRT with ACES hue shift at 100 and Blowout 30 for fire detail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It is a new HDR game mod with custom color-pipeline shader math, resource-format upgrades, and a Preset Off gap that require human and in-game runtime verification.

1 open finding
What changed in this PR

This PR adds a new RenoDX HDR mod for Well Dweller (GameMaker, D3D11). It upgrades the game's output-size RGBA8 render targets (application surface, LUT output, GUI composite) to RGBA16F so additive sprite highlights survive above 1.0, and replaces the 64³ LUT color-grade shader (0xBCCF990A) with a max-channel LUT bridge that preserves the vanilla grade while recovering HDR range.

Changes:

  • New mod scaffold (addon.cpp, shared.h, metadata.json, swap-chain proxy shaders) derived from the generic template, plus an unconditional RGBA8→RGBA16F output-size upgrade and user-toggleable resource upgrades.
  • Replaced LUT shader: Vanilla/0 saturate-emulates the original RGBA8 clamp; HDR path rolls off the max channel (c_infinity_rolloff::MaxChannel, engineered neutral_sdr), samples the vanilla sRGB-domain LUT as graded_sdr, then ToneMapPass(untonemapped, graded_sdr, neutral_sdr) reconstructs highlight range.
  • Added a "Hue Shift Method" setting (Vanilla Clip / ACES) with defaults RenoDRT, ACES hue shift 100, Blowout 30.
File Description
src/​games/​welldweller/​0xBCCF990A.ps_4_0.hlsl LUT color-grade shader with max-channel HDR bridge and Vanilla/0 RGBA8 clamp emulation.
src/​games/​welldweller/​addon.cpp Addon setup: settings, resource upgrades, swapchain proxy config; OnPresetOff left empty (see comment).
src/​games/​welldweller/​shared.h ShaderInjectData layout and RenoDX defines; adds tone_map_hue_shift_method.
src/​games/​welldweller/​swap_chain_proxy_pixel_shader.ps_5_x.hlsl Final SwapChainPass output-encoding proxy.
src/​games/​welldweller/​swap_chain_proxy_vertex_shader.vs_5_x.hlsl Fullscreen-triangle vertex shader for the proxy.
src/​games/​welldweller/​metadata.json Mod metadata (Steam App ID, D3D11, x64).

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/games/welldweller/addon.cpp Resolved
reno and others added 2 commits October 16, 2026 10:12
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add a Debanding setting (None, 8+2, 10+2; default 10+2) that dithers the
final swapchain output. The dither seed is fixed so the pattern does not
flicker between frames.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants