16 lines
311 B
Plaintext
16 lines
311 B
Plaintext
|
#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);
|
||
|
}
|