3dphotoshoot
diff sdr/vertex.glsl @ 25:ac80210d5fbe
preparing a pc version for easier development of non-android-specifics
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 18 Jun 2015 03:12:30 +0300 |
parents | d7fe157c402d |
children |
line diff
1.1 --- a/sdr/vertex.glsl Tue Jun 16 06:17:59 2015 +0300 1.2 +++ b/sdr/vertex.glsl Thu Jun 18 03:12:30 2015 +0300 1.3 @@ -1,7 +1,9 @@ 1.4 -attribute vec4 attr_vertex, attr_texcoord, attr_color; 1.5 +attribute vec4 attr_vertex, attr_normal, attr_texcoord, attr_color; 1.6 1.7 uniform mat4 matrix_modelview, matrix_projection, matrix_texture; 1.8 +uniform mat3 matrix_normal; 1.9 1.10 +varying vec3 normal; 1.11 varying vec4 tex_coords, color; 1.12 1.13 void main() 1.14 @@ -10,4 +12,5 @@ 1.15 gl_Position = mvp * attr_vertex; 1.16 tex_coords = matrix_texture * attr_texcoord; 1.17 color = attr_color; 1.18 + normal = matrix_normal * attr_normal.xyz; 1.19 }