handle-sdr-tonemap-lut
RenoDX HLSL/Slang shader workflow for proven shader-side SDR tonemap, hard clip, LUT, color grade, and HDR bridge changes. Use when editing game shaders for neutral-by-default ToneMapPass/RenoDRT, vanilla/0 ToneMapPass user grading, Preset Off vanilla reset, PsychoV17, vanilla midgray/slope or inflection matching, UpgradeToneMap delta, SDR LUT bridges, N2 max-channel reconstruction, gamut compression, hue/saturation clip emulation, internal/user LUTs, or shader-side tonemap/LUT replacements after upstream HDR/SDR signals are identified.
clshortfuse · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add clshortfuse/renodx --skill handle-sdr-tonemap-lut技能说明
name: handle-sdr-tonemap-lut description: "RenoDX HLSL/Slang shader workflow for proven shader-side SDR tonemap, hard clip, LUT, color grade, and HDR bridge changes. Use when editing game shaders for neutral-by-default ToneMapPass/RenoDRT, vanilla/0 ToneMapPass user grading, Preset Off vanilla reset, PsychoV17, vanilla midgray/slope or inflection matching, UpgradeToneMap delta, SDR LUT bridges, N2 max-channel reconstruction, gamut compression, hue/saturation clip emulation, internal/user LUTs, or shader-side tonemap/LUT replacements after upstream HDR/SDR signals are identified." argument-hint: "game shader, proven HDR/SDR signals, and goal, e.g. audit LUT bridge, add PsychoV17, fix hard-clip ToneMapPass, or verify Preset Off"
Handle SDR Tonemap + Optional LUT
Use this skill for RenoDX shader-side tonemap/LUT work in HLSL or Slang. Keep the workflow focused on shader changes: finding the right color signal, preserving the vanilla SDR appearance, and choosing a shader bridge into HDR.
RenoDX is not a final-frame inverse-tonemap postprocess. Do not start from the completed SDR swapchain image and expand it with an inverse curve like Microsoft AutoHDR, RTX HDR, or generic ReShade FX. If the target pass/resource or upstream signal is not proven, switch to swapchain-resource-analysis first.
Shader-side RenoDX tonemapping is a forward display-mapping decision for a proven upstream signal. It should target user-configurable HDR output levels, preserve the game's intended SDR art direction, and avoid overcoloring or oversaturating the original look.
Neutral-by-default rule
RenoDX mods should be neutral out of the box. Treat HDR as extending the original game's SDR pipeline limits into a display-referred range, not as permission to redesign the image.
- Preserve vanilla/original SDR contrast, saturation, hue, grade, and presentation effects unless the task explicitly proves a different target.
- Default tonemap/LUT settings should match the original/vanilla look as closely as practical in SDR output mode and keep the same art direction in HDR output mode.
- Use HDR headroom to preserve highlights, bloom, gradients, and gamut that the original pipeline clipped or compressed; do not add contrast or saturation just because the output is HDR.
- Put creative/non-neutral looks behind explicit user settings that default to neutral, or behind named presets such as
HDR Look; document rare exceptions with validation evidence. - Reject shader changes whose main visible effect is "more punch" without a proven vanilla reference or user-requested artistic control.
ToneMapPasswithRENODX_TONE_MAP_TYPE == 0/ Vanilla is a valid mode for keeping the game's vanilla process as the tonemap while still allowing user grading controls such as exposure, contrast, and saturation. Do not treat that as the same thing as a full Off preset.- A Vanilla/0 path may explicitly
saturateor clamp to emulate the original implicit RGBA8U/UNORM resource write clamp after a resource upgrade. Keep that scoped to vanilla preservation/reset behavior; do not reuse it as an HDR bridge, LUT proxy, orneutral_sdrrecommendation. - A Preset Off or equivalent reset should restore true 100% vanilla as closely as practical by disabling custom grading, HDR-look controls, and effect overrides; exact equivalence may be impossible after resource upgrades, but the difference must be intentional and documented.
Related skills and scope
| Need | Use |
|---|---|
Find the target pass, prove HDR source location, plan resource upgrades, or handle final SwapChainPass output | swapchain-resource-analysis |
| Build/link game addon, configure DevKit, create/resume a game folder | setup-game-mod-dev |
| Plot tone curves, slopes, LUT residuals, or sampled shader behavior | analysis-graphing |
This skill starts after a shader-side target and relevant signals are known. If the task is still about finding those signals, stay in swapchain-resource-analysis.
Treat the visible SDR look as a pipeline, not just a curve:
scene / post exposure / bloom / vignette / fade
-> SDR tonemap or hard clip
-> optional user LUT
-> internal/generated LUT or color grade
-> blend masks / strength / scaling
-> output encode
Boundaries
- Focus on HLSL/Slang shader changes and shared shader includes.
- Read
shared.honly to understand shader injection constants/macros used by the shader. - Put nontrivial reusable shader logic in the game's
common.hlsl,common.hlsli, or an existing nearby purpose-specific.hlsliinclude when that fits the folder pattern. - Do not turn this into addon UI, C++ plumbing, resource upgrade, CMake, or release workflow guidance.
- If the shader fix requires addon/resource/C++ work, report that as an external requirement instead of expanding this workflow.
- Require a proven shader-side signal such as
untonemapped,neutral_sdr, orgraded_sdr; if draw/resource analysis is missing, useswapchain-resource-analysisfirst. - Reject final swapchain/backbuffer inverse tonemapping as a RenoDX strategy. That is AutoHDR/RTX HDR/ReShade FX class postprocessing, not shader-side tonemap replacement.
Shader rules
- Keep changes local to the game/shader being worked on.
- RenoDRT is
renodx::draw::ToneMapPass(...). - Prefer current
ToneMapPassmethods used in the repo such as Neutwo or Reinhard. Do not recommend Hermite or Daniele as new strategy choices. - Do not extract helpers for local control flow, one-off math, basic field access, or short condition checks.
- Do move substantial tonemap/LUT bridge functions into a game-local common include instead of pasting large logic blocks into every original shader.
- When modifying decompiled/original shaders, keep edits minimal: capture the needed signal, call a common include helper or small scoped block, then assign the output.
- Clearly mark custom snippets and preserve vanilla logic by leaving it intact or commenting out replaced