PlanetEditor/grk/cw 6/shaders/shader_sun.frag
Natalia Nowakowska 92af34a58d init hdr buffer
2024-01-17 22:01:14 +01:00

23 lines
421 B
GLSL

#version 430 core
float AMBIENT = 0.1;
uniform vec3 lightPos;
in vec3 vecNormal;
in vec3 worldPos;
in vec2 vtc;
out vec4 outColor;
uniform sampler2D colorTexture;
void main()
{
vec3 lightDir = normalize(lightPos - worldPos);
vec3 normal = normalize(vecNormal);
//float diffuse = max(0, dot(normal, lightDir));
vec4 textureColor = texture2D(colorTexture, vtc);
outColor = vec4(vec3(textureColor) * 1.5, 1.0);
}