change light in shader_tex.frag
This commit is contained in:
parent
94a77b45b4
commit
1ffaf2b993
@ -12,6 +12,6 @@ void main()
|
|||||||
vec3 color = texture2D(textureSampler, modifiedTexCoord).rgb;
|
vec3 color = texture2D(textureSampler, modifiedTexCoord).rgb;
|
||||||
vec3 normal = normalize(interpNormal);
|
vec3 normal = normalize(interpNormal);
|
||||||
float ambient = 0.2;
|
float ambient = 0.2;
|
||||||
float diffuse = max(dot(normal, -lightDir), 0.0);
|
float diffuse = max(dot(normal, -lightDir), 0.1);
|
||||||
gl_FragColor = vec4(color * (ambient + (1-ambient) * diffuse), 1.0);
|
gl_FragColor = vec4(color * (ambient + (1-ambient) * diffuse * 0.7 ), 1.0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user