chore: remove all VR support#2475
Conversation
|
Important Review skippedToo many files! This PR contains 197 files, which is 47 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (197)
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 |
|
No actionable suggestions for changed features. |
|
✅ A pre-release build is available for this PR: |
|
also remove VR ci |
efe9626 to
3c55f4f
Compare
|
Done — |
Remove Skyrim VR as a supported target. All VR-specific code paths, shaders, build system options, and runtime checks are eliminated. Build system: - Remove ENABLE_SKYRIM_VR from CMakePresets.json (ALL, ALL-VS2022) - Remove SkyrimVR path from CMakeUserPresets.json.template - Remove VR shader validation matrix entry and config file (.github/configs/shader-validation-vr.yaml deleted) Deleted files: - src/Features/VR.cpp/h and entire src/Features/VR/ directory - src/Features/VRStereoOptimizations.cpp/h - src/Utils/VRUtils.cpp/h - features/VR/ (CORE marker, VR.ini) - package/Shaders/VR/ (StereoBlend, VRPostProcess, InSceneOverlay) - package/Shaders/VRStereoOptimizations/ (all shaders, cbuffers, modes) - package/Shaders/ISFullScreenVR.hlsl - package/Shaders/Tests/TestVR.hlsl, TestVRFlat.hlsl - package/Shaders/Common/VR.hlsli (no remaining callers) - features/Screen Space GI/Shaders/ScreenSpaceGI/stereoSync.cs.hlsl - features/Screen-Space Shadows/Shaders/ScreenSpaceShadows/StereoSyncCS.hlsl Core C++ changes: - Remove VR globals, FrameBufferVR struct, IsVR() branches everywhere - Remove VR D3D hooks from Globals.cpp - Simplify FrameBufferCache getters (no eyeIndex, no VR branches) - Remove VR feature list filtering from Feature.cpp - Remove stereo optimization dispatch from Deferred.cpp - Remove VR constant buffer offsets and ISFullScreenVR from ShaderCache - Remove VR address library check from XSEPlugin.cpp - Remove GetEyePosition/GetCameraData VR overloads from Game.h/cpp - Remove VRUtils and all VR utility functions Shader changes: - FrameBuffer.hlsli: convert all cbuffer members from [1] arrays to plain variables; remove eyeIndex parameters from all helpers - Remove eyeIndex parameters from ShadowSampling.hlsli, MotionBlur.hlsli, SharedData.hlsli and all feature shaders (~30 files) - Remove all #ifdef VR / #if defined(VR) dead code blocks - Remove Stereo:: namespace calls (functions were already no-ops) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
GetVSMShadow3D and GetVSMShadow2D had their eyeIndex parameter removed but two call sites in ShadowSampling.hlsli still passed a literal 0 as that argument, shifting it onto the out param and causing X3025 (l-value specifies const object) at runtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Lighting.hlsl was calling SharedData::GetWaterData with a spurious second argument (the old eyeIndex=0) after the parameter was removed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove spurious trailing 0 (old eyeIndex) from calls to: - ShadowSampling::GetWorldShadow (Lighting, RunGrass, ISVolumetricLightingGenerateCS) - ShadowSampling::Get3DFilteredShadow (Water) - MotionBlur::GetSSMotionVector (RunGrass) - ScreenSpaceShadows::GetScreenSpaceShadow (Lighting, RunGrass) - Hair::HairSelfShadow (Lighting) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Lighting.hlsl passed a spurious 0 before the out param dirVSMDetailedShadow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ght calls Two additional HairSelfShadow calls in the point light loop in Lighting.hlsl still had the old eyeIndex=0 argument. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- FrameBuffer.hlsli: remove unused 'stereo' default parameter from ClampDynamicResolutionAdjustedScreenPosition and both overloads of GetDynamicResolutionAdjustedScreenPosition - Water.hlsl: remove unused 'a_useVR' default parameter from GetScreenDepthWater - Delete ClearHMDMaskCS.hlsl (VR-only HMD mask compute shader with no C++ callers) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- VolumetricFogConservativeDepthCS.hlsl: remove stale ', 0' eyeIndex args from ConvertUVToSampleCoord calls - en.json: regenerate to remove 3 deleted VR upscaling translation keys (feature.upscaling.native_inputs, upscaling_intermediates, view_resize) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- LightLimitFix.h: remove unused 'eyeCount' member (was used to loop over VR eyes, always 1 since VR removal) - Upscaling.h/cpp: remove eyeOffsetX from UpscalingDataCB struct and unwrap the numEyes=1 loop — renderWidth is now used directly - EncodeTexturesCS.hlsl: remove EyeOffsetX cbuffer field and replace all srcCoord uses with dispatchID.xy directly - docs/new-feature-template/NewFeatureReadme.md: update cross-platform note from SE/AE/VR to SE/AE, remove VR checklist item Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shader cbuffer changes (all shaders): - Convert all World[1], PreviousWorld[1], WorldViewProj[1], WorldView[1], EyePos[1], EyePosition[1], PosAdjust[1], QPosAdjust[1], TextureProj[1], ScreenProj[1], ViewProj[1], HighDetailRange[1], BonesPivot[1], PreviousBonesPivot[1], CameraViewProj[1], CameraViewProjInverse[1], WindInput[1], VolumetricFogClipToWorld[2] from [N] arrays to plain vars - Convert ShadowMapProj[1][3] to ShadowMapProj[3] (remove eye dimension) - Update all X[0] accesses to X, and X[0][n] row accesses to X[n] C++ changes: - ExponentialHeightFog: clipToWorld[2] -> plain, remove redundant [1] fill - LightLimitFix: eyePositionCached[1] -> plain - Upscaling: encodeTexturesCS[5] -> [4], remove dead encodeTexturesCSDepthOutput - D3D.h/D3D.cpp/FrameAnnotations.cpp: inline GetRenderTargetCount() and GetDepthStencilCount() -> RE::RENDER_TARGETS::kTOTAL etc., remove functions - Game.h/all call sites: inline GET_INSTANCE_MEMBER and GET_INSTANCE_MEMBER_PTR macros, remove macro definitions i18n: - DynamicCubemaps: remove key_feature_4 (VR-specific 'standard rendering modes'), rename key_feature_5 -> key_feature_4 - Regenerate en.json (2083 keys), re-sort zh_CN.json Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- zh_CN.json: rename key_feature_5 -> key_feature_4 for dynamic_cubemaps - LightLimitFix.h: remove duplicate key_feature_5 (same text as key_feature_4) - Regenerate en.json (2082 keys) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ShaderCache.h: remove GetFlat() from LightingPS/GrassPS/EffectPS — named 'Flat' to contrast with a VR variant that no longer exists; inline as default constructor directly in Get() - ScreenshotFeature.cpp: suppress C4244 double->float warning from third-party sk_hdr_png.hpp header with pragma push/pop Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the cached float2 screenSize from State. All call sites now read directly from globals::game::graphicsState->screenWidth/screenHeight (RE::BSGraphics::State) which is the authoritative game viewport. - State.h: remove float2 screenSize member - State.cpp: remove the screenSize assignment from texture dimensions; BufferDim and MipBias now read graphicsState directly - All other call sites (~13 files) updated to use graphicsState Also remove now-unused 'auto state = globals::state' local declarations left in ScreenSpaceShadows, FidelityFX, and Streamline functions where the only previous use was state->screenSize. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
LightData::positionWS[2] -> positionWS: - LightLimitFix.h: PositionOpt positionWS[2] -> plain positionWS - LightLimitFix.cpp: positionWS[0].data -> positionWS.data - Common.hlsli: float4 positionWS[2] -> float4 positionWS - All shader consumers: light.positionWS[0].xyz -> light.positionWS.xyz (Effect, Lighting, Particle, RunGrass, Water, VolumetricFog, ClusterCulling) - Debug format string: remove stale positionWS[1] reference SSGICB PrevInvViewMat[2] / NDCToViewMul[2] / NDCToViewAdd[2]: - ScreenSpaceGI.h: flatten to plain float4x4 / float4 / float4 - ScreenSpaceGI.cpp: static prevInvView[2] -> plain; remove [0] indexing - common.hlsli: float4x4 PrevInvViewMat[2] -> float4x4 PrevInvViewMat - radianceDisocc.cs.hlsl: PrevInvViewMat[0] -> PrevInvViewMat Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Util::GetAverageEyePosition() -> GetEyePosition() (previously averaged left+right eye in VR; now just returns single camera eye position) - TerrainBlending::averageEyePosition -> eyePosition (same naming artifact) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- LightLimitFix.cpp: replace direct posAdjust.getEye(0) with Util::GetEyePosition() for consistency with all other callers - LightLimitFix.cpp: clarify misleading cache comment (data comes from frameBufferCached, not from cameraData) - .claude/CLAUDE.md: remove VR presets (VR, PRE-AE), SkyrimVR deployment path, VR shader validation command, VR runtime patterns, VRUtils entry, and all references to VR as a supported target Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Strip dead VR third argument from 32 REL::Relocate(se, ae, vr) calls
across 14 files — with ENABLE_SKYRIM_VR=OFF the third arg compiled
away but was still dead code clutter.
VR-only REL::Relocate(0, 0, vr) expressions replaced:
- TerrainBlending.cpp: VR-only kCallerRva* constants → removed;
allowlists now explicitly empty (auto-broad fallback handles SE/AE)
- ShadowmapCascadeRasterizerFix.h: REL::Relocate<uintptr_t>(0,0,vr)
→ static_cast<uintptr_t>(0) (INI/GameSetting fallback on SE/AE)
Other fixes:
- ScreenSpaceGI.cpp: cameraData.getEye(0) → getEye() (remove explicit
VR-awareness from the default-arg call)
- Globals.h: remove empty 'namespace llf {}' stub
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove remaining VR references from docs, CI scripts, tools, and translation files: - Fix stale zh_CN.json orphan key (light_limit_fix.key_feature_5) - Remove VR from AI/Copilot instructions, README, coderabbit example - Clean generate-shader-configs.ps1 of SkyrimVR detection - Update verify-shader-refactor.ps1 default permutations (drop VR) - Fix DispatchEye -> Dispatch in ScreenSpaceShadows; remove dead eyeName param - Remove stale VR comments from SSGI shaders and TerrainBlending - Update Overrides/README.md feature list (remove VR entry) - Sync containerbuild.ps1 path replace with cleaned template Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3c55f4f to
7ceb37d
Compare
Summary
Completely removes Skyrim VR as a supported target. All VR-specific code paths, shaders, build system options, runtime checks, and eyeIndex parameters are eliminated. The project now targets SE/AE only and compiles with
ENABLE_SKYRIM_VR=OFF.What changed
Build system
ENABLE_SKYRIM_VR: ONfromCMakePresets.json(ALL,ALL-VS2022)CMakeUserPresets.json.template.github/configs/shader-validation-vr.yamlDeleted source files
src/Features/VR.cpp/hand entiresrc/Features/VR/directory (InSceneOverlay, Input, OpenVRDetection, OverlayDrag, SettingsUI, StereoBlend, WandPointing)src/Features/VRStereoOptimizations.cpp/hsrc/Utils/VRUtils.cpp/hfeatures/VR/(CORE marker, VR.ini)package/Shaders/VR/(StereoBlendCS, VRPostProcessCS, InSceneOverlay shaders)package/Shaders/VRStereoOptimizations/(all shaders, cbuffers, modes)package/Shaders/ISFullScreenVR.hlslpackage/Shaders/Tests/TestVR.hlsl,TestVRFlat.hlslpackage/Shaders/Common/VR.hlsli(zero callers remaining)features/Screen Space GI/Shaders/ScreenSpaceGI/stereoSync.cs.hlslfeatures/Screen-Space Shadows/Shaders/ScreenSpaceShadows/StereoSyncCS.hlslCore C++ changes
Globals.h/cpp: removeFrameBufferVR, VR globals, VR D3D hooks,isVRgame namespace varFrameBufferCachegetters: remove eyeIndex parameters, removeIsVR()branchesFeature.cpp: remove VR feature list filtering andSupportsVR()checksDeferred.cpp: remove stereo optimization dispatch, stereo blend, VR cbuffer bindingShaderCache.cpp/h: remove VR define injection, VR cbuffer offsets,ISFullScreenVRmappingGame.h/cpp: removeGetEyePosition(int),GetCameraData(int)VR overloads; simplify all gettersXSEPlugin.cpp: remove VR address library check and EngineFixesVR fallbackREL::Module::IsVR()/#ifdef ENABLE_SKYRIM_VRbranches throughoutShader changes
FrameBuffer.hlsli: convert all 12 cbuffer members from[1]arrays to plain variables; remove eyeIndex from all helper functionsShadowSampling.hlsli,MotionBlur.hlsli,SharedData.hlsliand ~30 feature shaders#ifdef VR/#if defined(VR)dead code blocks (ISTemporalAA.hlsl,Lighting.hlsl,RunGrass.hlsl,Water.hlsl, etc.)Stereo::namespace calls (functions were identity stubs with no callers)Verification
BuildRelease.bat ALLsucceedsVR,IsVR,eyeIndex,OpenVR,ENABLE_SKYRIM_VR, orstereoSyncreferences insrc/,package/Shaders/, orfeatures/extern/(CommonLibSSE-NG and other dependencies untouched)Reviewer notes
extern/CommonLibSSE-NGsubmodule is not modified — it still contains VR interfaces internally, but none are referenced by this project anymoreFrameBuffercbuffer members are now plainfloat4x4variables instead of[1]arrays — any future shader that tries to index them with[eyeIndex]will get a compile error, which is intentionalStereonamespace inVR.hlsliis deleted entirely since nothing included that file anymore🤖 Generated with Claude Code