gzdoom/wadsrc/static/shaders/glsl/bloomextract.fp

16 lines
384 B
Text
Raw Normal View History

2016-07-27 19:50:30 +00:00
in vec2 TexCoord;
out vec4 FragColor;
uniform sampler2D SceneTexture;
uniform sampler2D ExposureTexture;
2016-08-12 15:44:59 +00:00
uniform vec2 Scale;
uniform vec2 Offset;
2016-07-27 19:50:30 +00:00
void main()
{
float exposureAdjustment = texture(ExposureTexture, vec2(0.5)).x;
2016-08-12 15:44:59 +00:00
vec4 color = texture(SceneTexture, Offset + TexCoord * Scale);
FragColor = max(vec4((color.rgb + vec3(0.001)) * exposureAdjustment - 1, 1), vec4(0));
2016-07-27 19:50:30 +00:00
}