feat(okami): add Okami HD HDR addon#597
Open
zebancodes wants to merge 1 commit into
Open
Conversation
Native HDR for Okami HD (D3D11). Upgrades the game's render targets to FP16 (scRGB) and replaces the final upscale blit (0x03CF7614) to do all HDR conversion on the final composited frame. Okami is a hard-clip-SDR game (no master tone-map pass, no HDR scene buffer, no whole-image LUT), so HDR is recovered from the real additive bloom/emissive over-range the FP16 upgrade preserves and tone-mapped with RenoDRT (Neutwo) / ACES off a gamut-safe SDR base - no inverse tonemapping. Settings: Vanilla / None / ACES / RenoDRT tone mappers, color grading (exposure, highlights, shadows, contrast, saturation, highlight saturation, blowout, flare), Peak/Game brightness, and gamma correction. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new RenoDX HDR addon package for Okami HD (Steam 587620, D3D11) by upgrading key render targets to FP16 and performing HDR reconstruction + tone mapping in a custom replacement for the final swapchain blit.
Changes:
- Introduces an Okami-specific swapchain blit replacement shader (
0x03CF7614) that reconstructs HDR from FP16 over-range and outputs via RenoDX’s draw pipeline. - Adds runtime-injected tone mapping / grading settings wired through a shared injection header (
shared.h) and a new C++ addon entrypoint (addon.cpp). - Adds addon metadata (
metadata.json) for deployment/index tooling.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/games/okami/shared.h | Defines ShaderInjectData and RENODX_* macro mappings for runtime settings + HLSL injection. |
| src/games/okami/metadata.json | Declares addon identity and deployment metadata for Okami HD. |
| src/games/okami/blit_0x03CF7614.ps_4_1.hlsl | Implements final-frame HDR reconstruction + tone mapping in the swapchain blit replacement. |
| src/games/okami/addon.cpp | Registers the addon, upgrades RT formats to FP16, installs the custom swapchain shader, and exposes UI settings. |
| "game_exe": "okami.exe", | ||
| "process_name": "okami", | ||
| "api": "d3d11", | ||
| "architecture": "x64" |
Comment on lines
+29
to
+32
| // RenoDRT tone-map curve. The renodx::draw default is Daniele, but the | ||
| // handle-sdr-tonemap-lut skill prefers the current methods (Neutwo / Reinhard) | ||
| // and says not to use Daniele/Hermite as new choices. Fixed, not exposed - one | ||
| // curve is plenty for Okami's sparse, near-white over-range. |
Comment on lines
+29
to
+32
| // RenoDRT tone-map curve. The renodx::draw default is Daniele, but the | ||
| // handle-sdr-tonemap-lut skill prefers the current methods (Neutwo / Reinhard) | ||
| // and says not to use Daniele/Hermite as new choices. Fixed, not exposed - one | ||
| // curve is plenty for Okami's sparse, near-white over-range. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Okami HD — Native HDR addon
Adds a RenoDX HDR addon for Okami HD (Steam 587620, D3D11).
Approach
Okami HD is a hard-clip-SDR game — DevKit-confirmed: the final image is assembled directly in SDR across ~190 draws, with no master tone-map pass, no HDR scene buffer, and no whole-image LUT (its 256×1 1D LUT only feeds the half-res bloom bright-pass).
0x03CF7614) is replaced viaCustomSwapchainShaderand does all HDR conversion on the final composited frame.saturate()SDR base — no inverse tonemapping. The game's tone-curve / exposure / bloom passes run unmodified on the FP16 targets.Settings
Tone Mapper (Vanilla / None / ACES / RenoDRT), Peak / Game brightness, Gamma (Off / 2.2 / BT.1886), and color grading (exposure, highlights, shadows, contrast, saturation, highlight saturation, blowout, flare).
Validation
Lilium HDR Analysis across multiple night scenes: 0% invalid, ~98% BT.709, real recovered highlights (torches/portal ~900–1000 nits) while dark scenes stay dark (avg ~15 nits).
🤖 Generated with Claude Code