Skip to content

feat(wutheringwaves): Update for version 3.2#538

Open
spiwar wants to merge 7 commits intoclshortfuse:mainfrom
spiwar:wuthering-waves
Open

feat(wutheringwaves): Update for version 3.2#538
spiwar wants to merge 7 commits intoclshortfuse:mainfrom
spiwar:wuthering-waves

Conversation

@spiwar
Copy link
Copy Markdown
Contributor

@spiwar spiwar commented Apr 6, 2026

  • Update new shaders for version 3.2
  • Implemented and now uses extended UC2 tonemapping by default
  • Implemented N2 Max Channel/PsychoV11 displaymapping, hue correction with MB
  • Implemented LUT Strength control
  • Updated HDR Look, re-tuned defaults
  • Fixed Augusta's ult letterbox clamping
  • Fixed any other random issues
  • Removed Color Space toggle.

@clshortfuse clshortfuse requested a review from Copilot April 12, 2026 14:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates Wuthering Waves shader overrides for game version 3.2, including new tonemapping/display mapping paths and a letterbox fix.

Changes:

  • Added multiple new output_*.ps_6_0.hlsl shaders for 3.2 with extended tonemapping and display mapping integration.
  • Updated post-processing flow to capture untonemapped color, apply the selected tonemap path, then apply LUT/display mapping.
  • Adjusted the letterbox pixel shader to change its clamping behavior.

Reviewed changes

Copilot reviewed 21 out of 70 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/games/wutheringwaves/3_2/output/output_0x53F8DE9B.ps_6_0.hlsl New 3.2 output shader variant using extended tonemap + display mapping.
src/games/wutheringwaves/3_2/output/output_0x4A2B7CEE.ps_6_0.hlsl New 3.2 output shader variant with additional view-dependent logic + tonemap/LUT path.
src/games/wutheringwaves/3_2/output/output_0x41579D47.ps_6_0.hlsl New 3.2 output shader variant including inversion generation and display mapping.
src/games/wutheringwaves/3_2/output/output_0x29A3D152.ps_6_0.hlsl New 3.2 output shader variant with display map application path.
src/games/wutheringwaves/3_2/output/output_0x27F3D84B.ps_6_0.hlsl New 3.2 output shader variant with bloom/tonemap/display-map sequence.
src/games/wutheringwaves/3_2/output/output_0x20F51C79.ps_6_0.hlsl New 3.2 output shader variant with tonemap + LUT + display mapping.
src/games/wutheringwaves/3_2/output/output_0x17FE0A6E.ps_6_0.hlsl New 3.2 output shader variant with extended view-dependent pre-processing + tonemap/LUT path.
src/games/wutheringwaves/3_2/output/output_0x12A3DA21.ps_6_0.hlsl New 3.2 output shader variant with inversion generation + display map application.
src/games/wutheringwaves/3_2/effect/letterbox_0xE684565E.ps_6_0.hlsl New 3.2 letterbox shader; changes clamping behavior for output color.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +336 to +338
float _663 = (pow(_649, 0.012683313339948654f));
float _664 = (pow(_650, 0.012683313339948654f));
float _665 = (pow(_651, 0.012683313339948654f));
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

pow(x, 0.01268...) is undefined for negative x and will produce NaNs. Because _649/_650/_651 are derived from LUT results plus a negative dithering offset (... + -0.001953125f), they can go below 0 for very dark pixels. Please clamp the inputs to pow to >= 0 (e.g., max(0.0f, x)) before applying the exponent. This same pattern appears in several of the newly added output shaders and should be fixed consistently across them.

Suggested change
float _663 = (pow(_649, 0.012683313339948654f));
float _664 = (pow(_650, 0.012683313339948654f));
float _665 = (pow(_651, 0.012683313339948654f));
float _663 = (pow(max(0.0f, _649), 0.012683313339948654f));
float _664 = (pow(max(0.0f, _650), 0.012683313339948654f));
float _665 = (pow(max(0.0f, _651), 0.012683313339948654f));

Copilot uses AI. Check for mistakes.
Comment on lines +115 to +116
float _69 = min(max((_54 / (_51 + 0.0010000000474974513f)), 0.0f), 1.0f);
float _70 = max(_51, 0.0f);
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

The shader removed the non-negative clamp on SV_Target.xyz (previously max(..., 0.0f)). As written, if Material_032[0].y is outside [0, 1] (or if intermediate math overshoots), the lerp-like expression can produce negative output values, which commonly leads to downstream artifacts (NaNs in later ops, invalid blending, or unexpected tonemap behavior). If the goal is to avoid clamping highlights (upper bound), consider restoring only the lower-bound clamp (max(result, 0.0f)) while still allowing values > 1.0 for HDR.

Copilot uses AI. Check for mistakes.
Comment on lines +124 to +126
SV_Target.x = ((((Material_000[1].x) - _104) * (Material_032[0].y)) + _104);
SV_Target.y = ((((Material_000[1].y) - _105) * (Material_032[0].y)) + _105);
SV_Target.z = ((((Material_000[1].z) - _106) * (Material_032[0].y)) + _106);
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

The shader removed the non-negative clamp on SV_Target.xyz (previously max(..., 0.0f)). As written, if Material_032[0].y is outside [0, 1] (or if intermediate math overshoots), the lerp-like expression can produce negative output values, which commonly leads to downstream artifacts (NaNs in later ops, invalid blending, or unexpected tonemap behavior). If the goal is to avoid clamping highlights (upper bound), consider restoring only the lower-bound clamp (max(result, 0.0f)) while still allowing values > 1.0 for HDR.

Suggested change
SV_Target.x = ((((Material_000[1].x) - _104) * (Material_032[0].y)) + _104);
SV_Target.y = ((((Material_000[1].y) - _105) * (Material_032[0].y)) + _105);
SV_Target.z = ((((Material_000[1].z) - _106) * (Material_032[0].y)) + _106);
SV_Target.x = max(((((Material_000[1].x) - _104) * (Material_032[0].y)) + _104), 0.0f);
SV_Target.y = max(((((Material_000[1].y) - _105) * (Material_032[0].y)) + _105), 0.0f);
SV_Target.z = max(((((Material_000[1].z) - _106) * (Material_032[0].y)) + _106), 0.0f);

Copilot uses AI. Check for mistakes.
float _1000;
float _1001;
float _1002;
if (!(!(cb0_102x != 0.0f))) {
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

This condition is equivalent to if (cb0_102x != 0.0f) and the double-negation makes the control flow harder to read/debug when maintaining these overrides. If this shader is intended to be human-maintained (not purely generated), simplifying the condition would improve readability without changing behavior.

Suggested change
if (!(!(cb0_102x != 0.0f))) {
if (cb0_102x != 0.0f) {

Copilot uses AI. Check for mistakes.
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