summaryrefslogtreecommitdiff
path: root/gfx/shaders/view_tangents.vert
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/shaders/view_tangents.vert')
-rw-r--r--gfx/shaders/view_tangents.vert14
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 @@
1precision highp float;
2
3uniform mat4 Modelview;
4uniform mat4 Projection;
5
6layout (location = 0) in vec3 vPosition;
7layout (location = 2) in vec4 vTangent;
8
9out vec4 Tangent;
10
11void main() {
12 Tangent = vec4(Tangent.xyz = mat3(Modelview) * vTangent.xyz, vTangent.w);
13 gl_Position = Projection * Modelview * vec4(vPosition, 1.0);
14}