3dphotoshoot
diff sdr/normvis.p.glsl @ 27:3d082c566b53
fixed all the bugs, pc version works
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 18 Jun 2015 04:32:25 +0300 |
parents | ac80210d5fbe |
children |
line diff
1.1 --- a/sdr/normvis.p.glsl Thu Jun 18 03:55:05 2015 +0300 1.2 +++ b/sdr/normvis.p.glsl Thu Jun 18 04:32:25 2015 +0300 1.3 @@ -1,10 +1,12 @@ 1.4 +#ifdef GL_ES 1.5 precision mediump float; 1.6 +#endif 1.7 1.8 varying vec3 normal; 1.9 1.10 void main() 1.11 { 1.12 - vec3 ncol = normal * 0.5 + 0.5; 1.13 + vec3 ncol = normalize(normal) * 0.5 + 0.5; 1.14 gl_FragColor.rgb = ncol; 1.15 gl_FragColor.a = 1.0; 1.16 }