2024-01-12 20:37:53 +01:00
|
|
|
#version 430 core
|
|
|
|
|
|
|
|
|
2024-02-07 22:36:48 +01:00
|
|
|
uniform float exposition;
|
|
|
|
uniform sampler2D sunTexture;
|
|
|
|
out vec4 outColor;
|
|
|
|
in vec2 TexCoords;
|
2024-01-12 20:37:53 +01:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2024-02-07 22:36:48 +01:00
|
|
|
vec3 textureColor = texture2D(sunTexture, TexCoords).xyz;
|
|
|
|
vec3 adjustedColor = 1.0 - exp(-textureColor * exposition);
|
|
|
|
|
|
|
|
// Output the color with unchanged alpha
|
|
|
|
outColor = vec4(clamp(adjustedColor, 0.0, 1.0), 1.0);
|
|
|
|
//outColor = vec4(textureColor*min(1,exposition), 1.0);
|
2024-01-12 20:37:53 +01:00
|
|
|
}
|