16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 04:29:18 +02:00
Files
maszyna/shaders/postfx_tonemapping.frag
2018-10-16 20:32:45 +02:00

18 lines
299 B
GLSL

in vec2 f_coords;
layout(location = 0) out vec4 out_color;
#texture (tex1, 0, RGB)
uniform sampler2D tex1;
#include <tonemapping.glsl>
void main()
{
vec2 texcoord = f_coords;
vec3 hdr_color = texture(tex1, texcoord).xyz;
vec3 mapped = tonemap(hdr_color);
out_color = vec4(mapped, 1.0);
}