mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-03 09:32:31 +00:00
10a1b99a92
Lighting doesn't actually do lights yet, but it's producing pixels. Translucent seems to be working (2d draw uses it), and compose seems to be working.
19 lines
424 B
GLSL
19 lines
424 B
GLSL
#version 450
|
|
|
|
layout (input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput opaque;
|
|
layout (input_attachment_index = 1, set = 0, binding = 1) uniform subpassInput translucent;
|
|
|
|
layout (location = 0) out vec4 frag_color;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
vec3 o;
|
|
vec4 t;
|
|
vec3 c;
|
|
|
|
o = subpassLoad (opaque).rgb;
|
|
t = subpassLoad (translucent);
|
|
c = mix (o, t.rgb, t.a);
|
|
frag_color = vec4 (c, 1);
|
|
}
|