2023-02-08 14:40:15 +01:00
|
|
|
#version 450
|
|
|
|
|
|
|
|
|
|
uniform sampler2D tex;
|
|
|
|
|
|
2024-08-15 20:29:14 +02:00
|
|
|
in vec2 tex_coord;
|
|
|
|
|
out vec4 frag_color;
|
2023-02-08 14:40:15 +01:00
|
|
|
|
|
|
|
|
void main() {
|
2024-08-15 20:29:14 +02:00
|
|
|
const float auto_exposure_speed = 1.0;
|
|
|
|
|
frag_color.a = 0.01 * auto_exposure_speed;
|
|
|
|
|
frag_color.rgb = textureLod(tex, vec2(0.5, 0.5), 0.0).rgb +
|
2023-02-08 14:40:15 +01:00
|
|
|
textureLod(tex, vec2(0.2, 0.2), 0.0).rgb +
|
|
|
|
|
textureLod(tex, vec2(0.8, 0.2), 0.0).rgb +
|
|
|
|
|
textureLod(tex, vec2(0.2, 0.8), 0.0).rgb +
|
|
|
|
|
textureLod(tex, vec2(0.8, 0.8), 0.0).rgb;
|
2024-08-15 20:29:14 +02:00
|
|
|
frag_color.rgb /= 5.0;
|
2023-02-08 14:40:15 +01:00
|
|
|
}
|