mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
ad7aaa8f2a
OpenGL has been supporting this since version 3.3 and Vulkan requires it so it's the way to go.
13 lines
362 B
GLSL
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));
|
|
}
|