Shaders/transform3D.vert

Sat, 08 Mar 2014 13:55:46 +0200

author
larukedi
date
Sat, 08 Mar 2014 13:55:46 +0200
changeset 401
85c7261e590a
parent 338
096d3af2ccb2
permissions
-rw-r--r--

added LICENSE and README.md files

338
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
1 #version 330
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
2
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
3 layout(location = 0) in int vertex_index;
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
4
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
5 uniform mat4x3 vertex_coords;
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
6 uniform mat4x3 vertex_coords_view_space;
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
7 uniform mat4x2 tex_coords;
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
8
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
9 smooth out vec3 position;
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
10 smooth out vec2 texcoord;
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
11
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
12 void main()
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
13 {
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
14 gl_Position = vec4(vertex_coords[vertex_index], 1.0f);
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
15 position = vertex_coords_view_space[vertex_index];
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
16 texcoord = tex_coords[vertex_index];
096d3af2ccb2 * replaced OpenGL fixed-function immediate-mode pipeline with shader-based
overwatch
parents:
diff changeset
17 }

mercurial