diffren/shader/tone_map_frag.glsl
Kevin Trogant 7054c965a4 Initial commit
- Deferred renderer (forward)
- Loading models (temp)
- Started towards differentiation
2024-02-25 12:01:19 +01:00

16 lines
311 B
GLSL

#version 460
layout (location = 0) out vec4 frag_color;
layout (location = 0) uniform sampler2D h_color;
in VS_OUT {
vec2 texcoord;
} fs_in;
void main() {
vec3 hdr = texture(h_color, fs_in.texcoord).rgb;
vec3 ldr = hdr / (hdr + vec3(1.0));
frag_color = vec4(pow(ldr, vec3(1.0/2.2)), 1.0);
}