chore(sync): merge upstream CS 1.7.0-rc.1 (b74dedf96)#121
Conversation
…#2414) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…-shaders#2389) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…s#2464) Co-authored-by: Alan Tse <alandtse@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ore VR) This reverts upstream b48bf24 within the v1.7.0 sync. The plain merge let community-shaders#2475's VR deletions win silently on ~148 files our dev left unchanged; this revert restores VR everywhere it was stripped. Conflicts with our newer VR (foveated SSR #82, isVR refactor #113, stereo-opts, restored VRStereoOptimizations and Features/VR/*) were resolved keep-ours -- the merge commit already holds the correct, current VR state for those files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fixups making the merge+revert compile clean (ALL preset, 0 warnings): - Feature.h: drop duplicate SupportsVR (merge restored it; revert re-added the canonical one -> redefinition). - InverseSquareLighting.h: add CSEditor/LightEditor.h include (rename broke the transitive path WeatherEditor/ -> CSEditor/). - FidelityFX.cpp / Hooks.cpp: remove duplicated Upscale() body and CreateRenderTarget_Snow/_SnowSwap structs (revert re-added older copies beside our kept versions). - HomePageRenderer.cpp: drop stray ')' (our plain introText kept, upstream T() close auto-merged). - ScreenshotFeature.h + Hooks.cpp: drop upstream ProcessCaptureRequest decl/call (our screenshot path uses Capture()+worker thread; HDR-PNG rework deferred). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Parallel upstream/fork audits of the v1.7.0 merge surfaced two VR regressions invisible to the C++ build (HLSL not compiled there; the offsets are runtime): - ISTemporalAA.hlsl: drop orphaned #endif (revert artifact) that unbalanced the preprocessor and would fail CI shader validation / TAA at runtime. - Hooks.cpp: restore the VR (3rd) REL::Relocate offset on three render-target thunks the silent community-shaders#2475 strip removed (precip-mask depth 0x1917, cubemap reflections 0xCD2, depth reflections 0xD13) -- merge took the 2-arg form on non-conflicting lines and the revert didn't touch Hooks.cpp. - CMakeLists: add /bigobj (LLF ShadowCasterManager.cpp exceeds the COFF section limit on a fresh compile after the merge grew its includes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
VR runtime smoke (SteamVR null-driver headless rig) caught a real CTD the DLL/SE-smoke gates couldn't: an EXCEPTION_ACCESS_VIOLATION in BSShaderRenderTargets::Create (id 100458) +0xF4B. - Hooks.cpp: upstream's new CreateRenderTarget_Water1/Water2 hooks (community-shaders#2484, water RT fp16 promotion) shipped 2-arg REL::Relocate (no VR offset). On VR they wrote a CALL at the SE offset inside Create -> corrupted the function -> AV on the render thread. RE'd the VR call sites in SkyrimVR.exe Create (targets 0x59/0x5a): Water1 VR +0x12C2, Water2 VR +0x12D8 (cross-checked monotonic vs UnderwaterMask 0xE06 < Water 0x12C2/0x12D8 < PrecipitationMask 0x1917). Now 3-arg, works on VR. - Upscaling.cpp: drop the duplicate "Depth VR Propagate" block the community-shaders#2475 revert re-added beside our existing one (dev had exactly one, gated isVR && depthUpscaleActive). The sacred propagate stays; only the redundant copy removed. A parallel fork-feature-loss audit (dev 6728765 vs HEAD) found NO genuine fork losses: all removed capabilities were either relocated/preserved or upstream PR removals (e.g. SkySync Sun Position Offsets removed by upstream community-shaders#2408 -- evolution, not loss). All fork features (VR, foveated, LLF superset, branding, UAF hooks, #115, sacred propagate) confirmed intact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…haders#2408 Hybridize SkySync per the upstream-merge strategy: keep upstream community-shaders#2408's rework (moon-intensity sliders, DimSunlightUnderHorizon, climate-aware dim, Sky_UpdateColors, direction-lerp fader) AND restore the original author's altitude (horizon-dip) correction that community-shaders#2408 deleted while still advertising "fixes the sun appearing higher when you gain altitude". GetApparentDirection (Rodrigues rotation by -atan(altitude/RenderDistance)) + GetPlayerAltitude are re-added as additive helpers, applied with one line each inside community-shaders#2408's ProcessSun/ProcessMoon (altitude computed internally so community-shaders#2408's function signatures are untouched -> future upstream SkySync merges stay clean). Left community-shaders#2408's climate-aware dim + fixed-duration fader as-is (its currentDim is already weather-timed) to avoid rewriting the fader and creating bad merge diffs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Hybridize upstream 1.7.0's HDR-PNG screenshot rework (#b74dedf962) with the fork's VR per-eye capture. Upstream and the fork independently grew the same worker-thread + Util::Subrect architecture, so this layers upstream's new capabilities onto our VR path rather than choosing one: - Adopt sk_hdr_png export, CF_HDROP clipboard copy, async ProcessCaptureRequest drain, OpaquePreviewBlendCallback, and the HdrPngBitDepth/SdrUsePng/ CopyToClipboard settings. - Re-add the fork's VR support as additive blocks (keeps upstream structure for clean future merges): SupportsVR()=true, and Left/Right/Full-Frame Subrect presets seeded in PostPostLoad (not LoadSettings -- Feature::Load only dispatches to LoadSettings when the JSON already has a settings block, so a fresh install would skip a seed placed there). - Hooks.cpp: call ProcessCaptureRequest after HDR Present so the captured back buffer matches what is on screen. Smoke-tested both platforms: SE (HDR display on) captured via the HDR composite back buffer to a valid PNG; VR (HDR off) captured via kFRAMEBUFFER with the Left Eye Subrect preset to a valid BMP. Save runs on the worker thread in both; no crash, no new log errors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 212 files, which is 62 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (212)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
|
No actionable suggestions for changed features. |
|
|
||
| auto pixel_luminance = luminance; | ||
|
|
||
| for (size_t i = 0; i < width * height; i++) |
Run tools/extract-i18n.py --write so en.json matches the strings actually referenced via T() in source -- the i18n PR check (extract-i18n.py --check) was failing. The removed keys are fork DrawSettings (LLF, SSGI, VL, RenderDoc, DynamicCubemaps, VR, profiling UI) that render in plain English and are not yet wrapped in T(); they return when wrapped (tracked as the i18n follow-up). T() falls back to the inline English default at runtime, so no behavior change. Also remove a duplicated kSNOW/kSNOW_SWAP comment block in Hooks.cpp (a keep-ours/adopt-theirs merge artifact; comment only).
|
✅ A pre-release build is available for this PR: |
GetSceneDepthForFog assigns volumeUV/projectedDepth on every path, but the [branch] early-return trips fxc's uninitialized-variable analysis (X4000), which fails the fork's shader validation (--max-warnings 0). Initialize the out-params at function entry and the two caller locals. Behavior-preserving (values were already assigned before use). Same class as upstream community-shaders#2478/community-shaders#2479.
Local full validation surfaced warnings the truncated CI log hid: - ExponentialHeightFog GetSceneDepthForFog: entry-init alone didn't satisfy fxc; the early return inside [branch] still trips X4000. Restructure to single-exit (out-params assigned once; behind-camera keeps the zero init). - ISTemporalAA EncodeFeedbackLuma/DecodeFeedbackLuma: X3206 implicit truncation -- Color::LinearToGammaSafe/GammaToLinearSafe are float3->float3; apply the .xxx-in/.x-out scalar pattern already used on the PQ helpers. Verified locally: hlslkit Flatrim config -> 0 new warnings, 0 errors.
After regenerating en.json (dropped orphaned fork keys), zh_CN.json key order no longer matched, failing the sort-i18n.py --check step. Re-sorted via tools/sort-i18n.py --write (pure reorder, no key changes).
The translation format check flags keys present in zh_CN.json but not en.json. These 174 keys are upstream's translations for DrawSettings strings the fork resolved to its own (unwrapped) VR-superset versions, so they are absent from source and were dropped from en.json. They render in English via the T() fallback regardless, so the zh_CN entries were dead. Pruned to satisfy zh_CN subset of en.json; tracked for re-add in the i18n wrapping follow-up.
Summary
Syncs the fork up to upstream Community Shaders v1.7.0-rc.1, keeping full VR support (this fork is the VR maintainer). Lands as a single merge so upstream history is preserved for future syncs.
50 commits, 212 files, +17,085 / −3,166.
VR-restore mechanic (the important part)
Upstream
b48bf2409"remove all VR support" (community-shaders#2475) is an ancestor ofv1.7.0-rc.1. It touched ~197 files; only 56 produced conflict markers. On the other ~148 files and on non-conflicting lines within the 56, a plain merge silently adopts community-shaders#2475's VR deletions (e.g.REL::Relocate(0x2EC,0x2EC,0x248)→REL::Relocate(0x2EC,0x2EC)with no conflict marker). Conflict-level keep-ours is therefore not sufficient.So this branch is merge +
git revert b48bf2409:f8cbed009— mergev1.7.0-rc.1(resolve 56 conflicts: keep-ours VR / adopt upstream features / merge i18n + "Open Shaders" branding).47821fa6a— revert chore: remove all VR support community-shaders/skyrim-community-shaders#2475, re-adding VR everywhere it was silently stripped.b6e106535,74300488e— compile cascades +/bigobj.aae398096— RE'd VR offsets for two runtime crashes (Sky::UpdateColors id 25686, Water render targets) added to the VR address library; dedup the depth-propagate.d7e70c577SkySync,36376be8bscreenshot (see below).Upstream features adopted
Volumetric fog (community-shaders#2361), custom cursor (community-shaders#2480), SSS diffuse pre-pass + scatter modes (community-shaders#2407), water caustics with chromatic aberration (community-shaders#2433), Masks2 RT + SSGI AO fix (community-shaders#2411), advanced skin (community-shaders#2428), GPU/CPU profiling system (community-shaders#2389), CS-editor rename (community-shaders#2449), localization framework (community-shaders#2416), HDR/SDR PNG screenshots + clipboard (community-shaders#2434).
Hybridized (fork capability re-grafted onto upstream's rework)
Per our hybridization strategy — take the improvement, restore fork capability as additive blocks, keep upstream structure for clean future merges:
d7e70c577): adopted feat(skysync): rework shadow fader, expose sun/moon to shared data community-shaders/skyrim-community-shaders#2408's reworked shadow fader + sun/moon shared-data exposure; restored the original author's altitude/horizon-dip correction (GetApparentDirection) that feat(skysync): rework shadow fader, expose sun/moon to shared data community-shaders/skyrim-community-shaders#2408 dropped, as a one-line helper call in ProcessSun/ProcessMoon (upstream signatures untouched).36376be8b): adopted upstream's HDR-PNG export / clipboard / async drain wholesale; re-added the fork'sSupportsVR()+ Left/Right/Full-Frame VR Subrect presets as additive blocks.Testing
[E]/crash lines.Deferred / follow-up
T()fallback but aren't yet wrapped inT(TKEY()). Tracked as a follow-up issue. No functional gap.Merge note
Please merge as a merge commit (not squash) to preserve upstream's commit history for future syncs.