mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2025-02-23 18:17:44 +11:00
access pass 1 correctly
This commit is contained in:
parent
c1de320e4e
commit
9c30c6dc03
1 changed files with 4 additions and 4 deletions
|
@ -74,13 +74,13 @@ layout(location = 0) in vec2 vTexCoord;
|
||||||
layout(location = 1) in vec2 texel;
|
layout(location = 1) in vec2 texel;
|
||||||
layout(location = 0) out vec4 FragColor;
|
layout(location = 0) out vec4 FragColor;
|
||||||
layout(set = 0, binding = 2) uniform sampler2D Source;
|
layout(set = 0, binding = 2) uniform sampler2D Source;
|
||||||
layout(set = 0, binding = 3) uniform sampler2D PASS1;
|
layout(set = 0, binding = 3) uniform sampler2D PassOutput1;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
//sample all the relevant textures
|
//sample all the relevant textures
|
||||||
vec4 foreground = texture(PASS1, vTexCoord - screen_offset);
|
vec4 foreground = texture(PassOutput1, vTexCoord - screen_offset);
|
||||||
vec4 background = vec4(0.5);
|
vec4 background = vec4(0.5); //hardcoded value rather than LUT
|
||||||
vec4 shadows = texture(Source, vTexCoord - (shadow_offset + screen_offset));
|
vec4 shadows = texture(Source, vTexCoord - (shadow_offset + screen_offset));
|
||||||
vec4 background_color = bg_color;
|
vec4 background_color = bg_color;
|
||||||
|
|
||||||
|
@ -103,4 +103,4 @@ vec4 background_color = bg_color;
|
||||||
out_color = (foreground * foreground.a * contrast) + (out_color * (screen_light - foreground.a * contrast * pixel_opacity));
|
out_color = (foreground * foreground.a * contrast) + (out_color * (screen_light - foreground.a * contrast * pixel_opacity));
|
||||||
|
|
||||||
FragColor = vec4(out_color);
|
FragColor = vec4(out_color);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue