2016-07-27 19:50:30 +00:00
|
|
|
|
|
|
|
in vec2 TexCoord;
|
2018-06-12 21:52:33 +00:00
|
|
|
layout(location=0) out vec4 FragColor;
|
2018-06-13 13:53:56 +00:00
|
|
|
layout(binding=0) uniform sampler2D SceneTexture;
|
|
|
|
layout(binding=1) uniform sampler2D ExposureTexture;
|
2016-07-27 19:50:30 +00:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2016-09-18 13:57:22 +00:00
|
|
|
float exposureAdjustment = texture(ExposureTexture, vec2(0.5)).x;
|
2016-08-12 15:44:59 +00:00
|
|
|
vec4 color = texture(SceneTexture, Offset + TexCoord * Scale);
|
2016-09-18 13:57:22 +00:00
|
|
|
FragColor = max(vec4((color.rgb + vec3(0.001)) * exposureAdjustment - 1, 1), vec4(0));
|
2016-07-27 19:50:30 +00:00
|
|
|
}
|