Skip to content

Support for Skyrim Special Edition#558

Open
legoliamneeson wants to merge 8 commits into
clshortfuse:mainfrom
legoliamneeson:main
Open

Support for Skyrim Special Edition#558
legoliamneeson wants to merge 8 commits into
clshortfuse:mainfrom
legoliamneeson:main

Conversation

@legoliamneeson

Copy link
Copy Markdown

No description provided.

Comment thread src/games/skyrimse.zip Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

sus

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

that was for the nexus mod, I can't believe I left it in

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.h shader 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;
}
Comment thread src/games/skyrimse/shared.h Outdated

#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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 111 out of 112 changed files in this pull request and generated 3 comments.

Comment on lines +33 to +34
float w, h;
t0.GetDimensions(w, h);
Comment on lines +41 to +43
float w, h;
t0.GetDimensions(w, h);
if (w == 512.f && h == 256.f) return true;
Comment on lines +37 to +41
#define RENODX_SWAP_CHAIN_DECODING 2.f // 0 = linear, 1 = srgb, 2 = 2.2, 3 = 2.4, 4 = pq
#define RENODX_INTERMEDIATE_ENCODING 2.f // 0 = linear, 1 = srgb, 2 = 2.2, 3 = 2.4, 4 = pq
#define RENODX_SWAP_CHAIN_ENCODING renodx::draw::ENCODING_PQ
#define RENODX_SWAP_CHAIN_ENCODING_COLOR_SPACE color::convert::COLOR_SPACE_BT2020
#define CUSTOM_GRADING_STRENGTH shader_injection.color_grade_strength
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.

3 participants