nuclear@0: attribute vec4 attr_vertex; nuclear@0: attribute vec3 attr_normal; nuclear@0: attribute vec2 attr_texcoord; nuclear@0: nuclear@0: uniform mat4 st_world_matrix, st_view_matrix, st_proj_matrix; nuclear@0: uniform mat3 st_world_matrix3, st_view_matrix3; nuclear@0: nuclear@0: varying vec3 vpos, norm; nuclear@0: varying vec2 texcoord; nuclear@0: nuclear@0: void main() nuclear@0: { nuclear@0: mat4 worldview_matrix = st_view_matrix * st_world_matrix; nuclear@0: mat4 mvp_matrix = st_proj_matrix * worldview_matrix; nuclear@0: nuclear@0: gl_Position = mvp_matrix * attr_vertex; nuclear@0: nuclear@0: vpos = (worldview_matrix * attr_vertex).xyz; nuclear@0: norm = st_view_matrix3 * st_world_matrix3 * attr_normal; nuclear@0: texcoord = attr_texcoord; nuclear@0: }