vrshoot

view sdr/default.v.glsl @ 3:c179c72369be

rename candy->vr
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 03 Feb 2014 08:52:13 +0200
parents
children
line source
1 attribute vec4 attr_vertex;
2 attribute vec3 attr_normal;
3 attribute vec2 attr_texcoord;
5 uniform mat4 st_world_matrix, st_view_matrix, st_proj_matrix;
6 uniform mat3 st_world_matrix3, st_view_matrix3;
8 varying vec3 vpos, norm;
9 varying vec2 texcoord;
11 void main()
12 {
13 mat4 worldview_matrix = st_view_matrix * st_world_matrix;
14 mat4 mvp_matrix = st_proj_matrix * worldview_matrix;
16 gl_Position = mvp_matrix * attr_vertex;
18 vpos = (worldview_matrix * attr_vertex).xyz;
19 norm = st_view_matrix3 * st_world_matrix3 * attr_normal;
20 texcoord = attr_texcoord;
21 }