Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5faeed8
feat(endfield): switch to neutwo tonemapping by default
spiwar Jan 27, 2026
6394307
feat(endfield): disable cloning, fix hair shadows, fix reshade bypass
SGTForgery Jan 28, 2026
cb1d5fd
feat(endfield): re-tuned SDR and HDR hue correction values
spiwar Jan 28, 2026
a38e514
feat(endfield): adjust white clip for sdr & hdr
spiwar Jan 28, 2026
a640aa9
fix(endfield): re-enable swapchain encoding option, only upgrade RGBA…
spiwar Jan 29, 2026
4e2917b
feat(endfield): Added alt fog blend mode with hue preservation, Impro…
SGTForgery Jan 29, 2026
c2fe561
feat(endfield) Added deferred shader support for alt fog / bypass for…
SGTForgery Feb 1, 2026
2173490
feat(endfield) Added more deferred shaders, added missing UI shader f…
SGTForgery Feb 1, 2026
4332192
fix(endfield): change default white clip to 65.f
spiwar Feb 2, 2026
a28845a
feat(endfield): Added cubemap luminance, glass transparency, AO toggl…
SGTForgery Feb 4, 2026
145be95
feat(endfield): Added second glass transparency shader
SGTForgery Feb 4, 2026
2224e9b
chore(endfield): Added glass shader backup ASM
SGTForgery Feb 4, 2026
e04fa99
fix(endfield) Using .asm to stop glass shader freezing
SGTForgery Feb 4, 2026
09f0d0e
fix(endfield) Using .asm to stop glass shader freezing
SGTForgery Feb 4, 2026
a6d9441
feat(endfield) Added Improved GTAO with Vis Bitmask, AO modulation to…
SGTForgery Feb 13, 2026
35f48bf
feat(endfield): add mcleod boynton hlsl (need to remove when added of…
spiwar Feb 15, 2026
79cf125
feat(endfield): switch to mcleod boynton hue, remove hue sliders
spiwar Feb 15, 2026
dbfae0c
feat(endfield): Added AO distance scaling, Removed legacy code + cbuf…
SGTForgery Feb 18, 2026
f8dbc1d
fix(endfield): Move color grading functions before tonemapping
spiwar Feb 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
745 changes: 660 additions & 85 deletions src/games/endfield/addon.cpp

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions src/games/endfield/ao/ao-blur_0x80CD64F6.cs_5_0.hlsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#include "../shared.h"

Texture2D<float4> t2 : register(t2);
Texture2D<float4> t1 : register(t1);
Texture2D<float4> t0 : register(t0);

SamplerState s0_s : register(s0);

cbuffer cb0 : register(b0) {
float4 cb0[4];
}

RWTexture2D<unorm float> u0 : register(u0);

[numthreads(8, 8, 1)]
void main(uint3 vThreadID : SV_DispatchThreadID) {
// If game AO is disabled, just write 1.0 (no occlusion)
if (shader_injection.disable_game_ao >= 0.5f) {
u0[vThreadID.xy] = 1.0;
return;
}

// Original ao-blur logic
float2 r0xy = float2(vThreadID.xy) + float2(0.5, 0.5);
float2 r0zw = cb0[3].zw * r0xy;

float r1x = t1.SampleLevel(s0_s, r0zw, 0).z;
r1x = 1.0 - r1x;
r1x = saturate(r1x + r1x);
r1x *= AO_DENOISER_BLUR_BETA;

float r1y = t0.SampleLevel(s0_s, r0zw, 0).x;
float r1z = cb0[3].z;

float2 r2;
r2.y = 0;

float3 r3 = float3(-3, 0, 0);

[loop]
while (true) {
if (3 < r3.x) break;

float r1w = r3.x * r1z;
r2.x = r1w * r1x;
float2 r2zw = r2.xy * cb0[3].zw + r0zw;

r1w = t0.SampleLevel(s0_s, r2zw, 0).x;
r1w = r1w - r1y;
r1w = min(1.0, abs(r1w));
r1w = 1.0 - r1w;

float3 r4;
r4.x = r3.y + r1w;

float2 r2xz = r0xy * cb0[3].zw + r2.xy;
float r2x_sample = t2.SampleLevel(s0_s, r2xz, 0).x;
r4.y = r2x_sample * r1w + r3.z;
r4.z = 1.0 + r3.x;

r3 = r4.zxy;
}

float result = max(9.99999975e-05, r3.y);
result = r3.z / result;

u0[vThreadID.xy] = result;
}
Loading
Loading