Grafika_2024/projekt_grk/shaders/shader_sun.frag

16 lines
298 B
GLSL
Raw Normal View History

2024-01-29 22:05:00 +01:00
#version 430 core
2024-02-20 15:37:59 +01:00
uniform float exposition;
uniform sampler2D sunTexture;
2024-01-29 22:05:00 +01:00
2024-02-20 15:37:59 +01:00
in vec2 TexCoords;
out vec4 outColor;
2024-01-29 22:05:00 +01:00
void main()
{
2024-02-20 15:37:59 +01:00
vec3 textureColor = texture(sunTexture, TexCoords).xyz;
vec3 adjustedColor = textureColor * exposition;
outColor = vec4(clamp(adjustedColor, 0.0, 1.0), 1.0);
2024-01-29 22:05:00 +01:00
}