projects
/
mandelwow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50546b1
)
Change the light direction to nake the cubes less symmetric.
author
Bernie Innocenti
<bernie@codewiz.org>
Sun, 7 May 2017 00:36:49 +0000
(20:36 -0400)
committer
Bernie Innocenti
<bernie@codewiz.org>
Sun, 7 May 2017 00:36:49 +0000
(20:36 -0400)
shaded.vert
patch
|
blob
|
history
diff --git
a/shaded.vert
b/shaded.vert
index 4f3035c3a5c3400fee32c609a55d5e2764ecb228..65bc65dd42bcf323c61d84cff526b10d772086cc 100644
(file)
--- a/
shaded.vert
+++ b/
shaded.vert
@@
-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);