mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-01 08:31:59 +00:00
966ef949c5
I had debated putting the blending in the compose subpass or a separate pass but went with the separate pass originally, but it turns out that removing the separate pass gains 1-3% (5-15/545 fps in a timedemo of demo1).
20 lines
453 B
GLSL
20 lines
453 B
GLSL
#version 450
|
|
#extension GL_GOOGLE_include_directive : enable
|
|
#define OIT_SET 1
|
|
#include "oit_blend.finc"
|
|
|
|
layout (input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput opaque;
|
|
|
|
layout (location = 0) out vec4 frag_color;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
vec3 o;
|
|
vec3 c;
|
|
|
|
o = subpassLoad (opaque).rgb;
|
|
c = BlendFrags (vec4 (o, 1)).xyz;
|
|
c = pow (c, vec3(0.83));//FIXME make gamma correction configurable
|
|
frag_color = vec4 (c, 1);
|
|
}
|