gzdoom-gles/wadsrc/static/shaders/glsl/bloomextract.fp
Christoph Oelckers ad7aaa8f2a - specify fragment output locations in the shader source.
OpenGL has been supporting this since version 3.3 and Vulkan requires it so it's the way to go.
2018-06-12 23:52:33 +02:00

13 lines
362 B
GLSL

in vec2 TexCoord;
layout(location=0) out vec4 FragColor;
uniform sampler2D SceneTexture;
uniform sampler2D ExposureTexture;
void main()
{
float exposureAdjustment = texture(ExposureTexture, vec2(0.5)).x;
vec4 color = texture(SceneTexture, Offset + TexCoord * Scale);
FragColor = max(vec4((color.rgb + vec3(0.001)) * exposureAdjustment - 1, 1), vec4(0));
}