diff --git a/handheld/gameboy/shader-files/gb-pass4.slang b/handheld/gameboy/shader-files/gb-pass4.slang index cc37892..2c2f485 100644 --- a/handheld/gameboy/shader-files/gb-pass4.slang +++ b/handheld/gameboy/shader-files/gb-pass4.slang @@ -92,7 +92,7 @@ layout(location = 0) in vec2 vTexCoord; layout(location = 1) in vec2 texel; layout(location = 0) out vec4 FragColor; layout(set = 0, binding = 1) uniform sampler2D Source; -layout(set = 0, binding = 2) uniform sampler2D PassOutput2; +layout(set = 0, binding = 2) uniform sampler2D PassOutput1; //#define bg_color tex2D(COLOR_PALETTE, vec2(0.25, 0.5)) #define bg_color vec4(0.625, 0.664, 0.25, 0.5) @@ -116,9 +116,9 @@ void main() tex = (tex + 0.5) * global.PassOutputSize1.zw; // Sample all the relevant textures - vec4 foreground = texture(PassOutput2, tex - screen_offset); + vec4 foreground = texture(PassOutput1, tex - screen_offset); vec4 background = vec4(0.5); // Hardcoded value rather than LUT - vec4 shadows = texture(Source, tex - (shadow_offset + screen_offset)); + vec4 shadows = texture(Source, vTexCoord - (shadow_offset + screen_offset)); vec4 background_color = bg_color; // Foreground and background are blended with the background color