Change the light direction to nake the cubes less symmetric.
authorBernie Innocenti <bernie@codewiz.org>
Sun, 7 May 2017 00:36:49 +0000 (20:36 -0400)
committerBernie Innocenti <bernie@codewiz.org>
Sun, 7 May 2017 00:36:49 +0000 (20:36 -0400)
shaded.vert

index 4f3035c3a5c3400fee32c609a55d5e2764ecb228..65bc65dd42bcf323c61d84cff526b10d772086cc 100644 (file)
@@ -14,7 +14,7 @@ void main() {
     mat4 m = perspective * modelview;
     vec3 dark = vec3(0.0, 0.0, 0.1);
     vec3 bright = vec3(0.0, 0.0, 0.9);
-    vec3 u_light = vec3(-0.5, -0.5, -1.);
+    vec3 u_light = vec3(-0.5, -0.7, -0.6);
     vec3 v_normal = transpose(inverse(mat3(model))) * normal;
     float brightness = max(dot(normalize(v_normal), normalize(u_light)), 0.0);
     color = vec4(mix(dark, bright, brightness), 1.0);