Hi
I have been trying to implement an dynamic light color for the general sun light.
Now i have a strange Problem:
You can that i have an quadratic back ground konsisting of white quads and with the sides falling off. the Light source is an parallel light source shining directly down.
I’m using an color lookup table for the sun light(i’m using this texture i found on the internet at the moment):
my question now is why are there these black quads.
Here is my simplified GLSL code for the light source:
precision highp float;
uniform sampler2D normal;
uniform sampler2D l_map;
uniform vec3 delta;
uniform float time;
in vec2 pass_resolution;
out vec4 out_Color;
void main(void) {
vec2 position = gl_FragCoord.xy/pass_resolution.xy;
vec4 normal_color = texture2D(normal, position);
vec3 normal_vector = normalize(normal_color.xyz*2.0-1.0);
float lambert = abs(dot(normal_vector,normalize(delta))*0.5+0.5);//max(dot(normal_vector,normalize(delta)),0.0);
out_Color = texture2D(l_map,vec2(clamp(lambert,0.001,0.999),time*0.9));
}
where l_map is the texture posted above