Support for Skyrim Special Edition#558
Open
legoliamneeson wants to merge 2 commits into
Open
Conversation
clshortfuse
reviewed
May 25, 2026
There was a problem hiding this comment.
Pull request overview
Adds a new Skyrim Special Edition integration to the RenoDX codebase, consisting of a game-specific ReShade addon and a set of extracted/modified 3Dmigoto shaders (including tonemapping, TAA, and various effect passes) to enable HDR-aware rendering and swapchain handling.
Changes:
- Introduces a SkyrimSE addon (
addon.cpp) with settings + swapchain proxy/upgrade configuration. - Adds
shared.hshader injection definitions and swapchain proxy shaders for final presentation. - Adds multiple SkyrimSE pixel shaders (tonemap/TAA/fog/sky/particles/etc.) with HDR-oriented adjustments and fixes.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/games/skyrimse/addon.cpp | Game addon entry point, settings UI bindings, swapchain proxy + upgrade targets |
| src/games/skyrimse/shared.h | Shared shader-injection CB + RenoDX include wiring for SkyrimSE shaders |
| src/games/skyrimse/swap_chain_proxy_vertex_shader.vs_5_x.hlsl | Fullscreen triangle proxy vertex shader for swapchain pass |
| src/games/skyrimse/swap_chain_proxy_pixel_shader.ps_5_x.hlsl | Swapchain pass pixel shader (includes optional UV flip for OpenGL) |
| src/games/skyrimse/tonemap_0x936CE1A3.ps_5_0.hlsl | Main tonemap shader variant with RenoDX HDR path integration |
| src/games/skyrimse/tonemap2_0x1F60675B.ps_5_0.hlsl | Tonemap variant with extra fade/tint handling |
| src/games/skyrimse/taa_0x675543CF.ps_5_0.hlsl | TAA pass modified for PQ encode/decode handling |
| src/games/skyrimse/motionvectors_0xB1474DA7.ps_5_0.hlsl | Motion vectors/exposure adaptation adjustments to reduce flicker |
| src/games/skyrimse/sky_0xC0B0305A.ps_5_0.hlsl | Sky/sun shader with HDR “size lock” + lifting logic |
| src/games/skyrimse/fire4_0x11B52725.ps_5_0.hlsl | Particle/fire shader tweaks (alpha test tolerance, clamping/boosting) |
| src/games/skyrimse/northernLights_0x80491AEF.ps_5_0.hlsl | Northern lights pixel shader adjustments (non-negative clamp) |
| src/games/skyrimse/menuBlur_0xF9D50018.ps_5_0.hlsl | Menu blur with minimum step enforcement to avoid degenerate sampling |
| src/games/skyrimse/dof_0xA82C3C26.ps_5_0.hlsl | DoF shader with output clamped to non-negative |
| src/games/skyrimse/fog1_0x4A1240D0.ps_5_0.hlsl | Fog pass variant 1 |
| src/games/skyrimse/fog2_0x74270930.ps_5_0.hlsl | Fog pass variant 2 |
| src/games/skyrimse/fog4_0xE510AF4E.ps_5_0.hlsl | Fog pass variant 4 |
| src/games/skyrimse/lightingobj1_0xEDD3B605.ps_5_0.hlsl | Object lighting shader with window-texture detection/boost logic |
| src/games/skyrimse/ui1_80xA9FD7989.ps_5_0.hlsl | UI-related pixel shader pass |
| src/games/skyrimse/uv_0xFEE901F4.ps_5_0.hlsl | UV sampling shader with UV clamping removed |
| src/games/skyrimse/RGBUV_0xF5D07282.ps_5_0.hlsl | RGB/UV sampling shader with UV clamping removed |
| src/games/skyrimse/magic_0x2D38165D.ps_4_0.hlsl | Simple magic pass with saturated output |
| src/games/skyrimse/0xBA5E7BEF.ps_5_0.hlsl | Small mask/color combine shader with non-negative clamps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+44
to
+55
| new renodx::utils::settings::Setting{ | ||
| .key = "ToneMapType", | ||
| .binding = &shader_injection.tone_map_type, | ||
| .value_type = renodx::utils::settings::SettingValueType::INTEGER, | ||
| .default_value = 3.f, | ||
| .can_reset = true, | ||
| .label = "Tone Mapper", | ||
| .section = "Tone Mapping", | ||
| .tooltip = "Sets the tone mapper type", | ||
| .labels = {"Vanilla","RenoDRT"}, | ||
| .is_visible = []() { return current_settings_mode >= 1; }, | ||
| }, |
Comment on lines
+105
to
+110
| if (RENODX_TONE_MAP_TYPE == 1.f) { | ||
| // Eye adaptation | ||
| float lum = dot(float3(0.212500006, 0.715399981, 0.0720999986), r0.xyz); | ||
| lum = max(9.99999975e-006, lum); | ||
| float lumAdjusted = lum * r2.y / r2.x; | ||
|
|
| } | ||
|
|
||
| // ===== HDR PATH (RenoDRT / ACES / None) ===== | ||
| if (RENODX_TONE_MAP_TYPE == 1.f) { |
Comment on lines
+33
to
+36
| float w, h; | ||
| t0.GetDimensions(w, h); | ||
|
|
||
| if (w != 512.f || h != 512.f) return false; |
Comment on lines
+40
to
+46
| bool IsNorthenLightsTexture() { | ||
| float w, h; | ||
| t0.GetDimensions(w, h); | ||
| if (w == 512.f && h == 256.f) return true; | ||
|
|
||
| return false; | ||
| } |
Comment on lines
+34
to
+42
| bool IsWindowTexture() { | ||
| float w, h; | ||
| t0.GetDimensions(w, h); | ||
| if (w != 2048.f || h != 2048.f) return false; | ||
|
|
||
|
|
||
|
|
||
| return true; | ||
| } |
|
|
||
| #endif | ||
|
|
||
| #endif // SRC_TEMPLATE_SHARED_H_ |
| r2.xy = (int2)r2.xy; | ||
|
|
||
| // Clamp adaptation rate — this is the key change. | ||
| // Original: 0.00390625 (1/256). We raise the floor so max speed is slower. |
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.
No description provided.