nuclear@2: attribute vec4 attr_vertex, attr_color; nuclear@2: attribute vec2 attr_texcoord; nuclear@2: attribute vec4 attr_tangent; nuclear@2: attribute vec3 attr_normal; nuclear@2: nuclear@2: uniform mat4 matrix_modelview, matrix_projection, matrix_texture; nuclear@2: uniform mat3 matrix_normal; nuclear@2: uniform float t; nuclear@2: uniform vec4 light_pos; nuclear@2: nuclear@2: varying vec3 vpos, normal, tangent; nuclear@2: varying vec4 tc; nuclear@2: varying vec3 lpos; nuclear@2: nuclear@2: void main() nuclear@2: { nuclear@2: mat4 mvp = matrix_projection * matrix_modelview; nuclear@2: gl_Position = mvp * attr_vertex; nuclear@2: nuclear@2: vpos = (matrix_modelview * attr_vertex).xyz; nuclear@2: nuclear@2: normal = matrix_normal * attr_normal; nuclear@2: tangent = matrix_normal * attr_tangent.xyz; nuclear@2: nuclear@2: lpos = (matrix_modelview * light_pos).xyz; nuclear@2: nuclear@2: tc = matrix_texture * vec4(attr_texcoord, 0.0, 1.0); nuclear@2: }