uniform sampler2D normalSampler2D;
uniform vec3 lightDirection;
varying vec2 fetcher;
void main()
{
vec3 normal = texture2D(normalSampler2D,fetcher).rbg;
normal = normalize(normal * 2.0 - 1.0);
vec3 lightDir = normalize(lightDirection);
float NdotL = max(dot(normal,-lightDir), 0.0);
vec4 diffuse = vec4(1.0,1.0,1.0,1.0);
gl_FragColor = NdotL * diffuse;
}
Why does it look like a quaddy pattern?
Bilinear filtering is on for sure.