diff options
Diffstat (limited to 'gfx/shaders/view_tangents.vert')
-rw-r--r-- | gfx/shaders/view_tangents.vert | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gfx/shaders/view_tangents.vert b/gfx/shaders/view_tangents.vert new file mode 100644 index 0000000..561ad22 --- /dev/null +++ b/gfx/shaders/view_tangents.vert | |||
@@ -0,0 +1,14 @@ | |||
1 | precision highp float; | ||
2 | |||
3 | uniform mat4 Modelview; | ||
4 | uniform mat4 Projection; | ||
5 | |||
6 | layout (location = 0) in vec3 vPosition; | ||
7 | layout (location = 2) in vec4 vTangent; | ||
8 | |||
9 | out vec4 Tangent; | ||
10 | |||
11 | void main() { | ||
12 | Tangent = vec4(Tangent.xyz = mat3(Modelview) * vTangent.xyz, vTangent.w); | ||
13 | gl_Position = Projection * Modelview * vec4(vPosition, 1.0); | ||
14 | } | ||