2022-01-20 21:58:50 +08:00
|
|
|
#version 330
|
|
|
|
|
2022-01-29 22:29:27 +08:00
|
|
|
uniform sampler2D tex;
|
2022-02-15 23:37:42 +08:00
|
|
|
uniform float gamma, exposure;
|
2022-01-20 21:58:50 +08:00
|
|
|
|
2022-01-22 23:06:41 +08:00
|
|
|
in vec2 fragPosScreen;
|
2022-01-20 21:58:50 +08:00
|
|
|
out vec4 outputColor;
|
|
|
|
|
|
|
|
void main() {
|
2022-02-15 23:37:42 +08:00
|
|
|
vec4 texColor = texture(tex, fragPosScreen);
|
|
|
|
if (texColor.a < 1e-4)
|
|
|
|
discard;
|
|
|
|
|
|
|
|
outputColor = vec4(pow(texColor.rgb / exposure, vec3(1.0/gamma)), 1.0f);
|
2022-01-20 21:58:50 +08:00
|
|
|
}
|