change light in shader_tex.frag

This commit is contained in:
Thyme1 2021-12-30 14:50:39 +01:00
parent 94a77b45b4
commit 1ffaf2b993

View File

@ -12,6 +12,6 @@ void main()
vec3 color = texture2D(textureSampler, modifiedTexCoord).rgb;
vec3 normal = normalize(interpNormal);
float ambient = 0.2;
float diffuse = max(dot(normal, -lightDir), 0.0);
gl_FragColor = vec4(color * (ambient + (1-ambient) * diffuse), 1.0);
float diffuse = max(dot(normal, -lightDir), 0.1);
gl_FragColor = vec4(color * (ambient + (1-ambient) * diffuse * 0.7 ), 1.0);
}