aboutsummaryrefslogtreecommitdiffstats
path: root/vert.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'vert.glsl')
-rw-r--r--vert.glsl10
1 files changed, 6 insertions, 4 deletions
diff --git a/vert.glsl b/vert.glsl
index 906408e..9fea064 100644
--- a/vert.glsl
+++ b/vert.glsl
@@ -1,11 +1,13 @@
-// Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com>
-// SPDX-License-Identifier: MIT
+/*
+ * Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com>
+ * SPDX-License-Identifier: MIT
+ */
#version 330 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec3 norm;
layout (location = 2) in vec2 uv;
-out vec3 vnorm;
+out vec3 fnorm;
out vec3 fpos;
out vec2 fuv;
out vec3 lipos;
@@ -22,6 +24,6 @@ void main()
fpos = vec3(view * model * vec4(pos, 1.0));
fuv = uv;
// TODO: Try to work out how to only do this ONCE in C or see if it matters
- vnorm = mat3(transpose(inverse(view * model))) * norm;
+ fnorm = mat3(transpose(inverse(view * model))) * norm;
lipos = vec3(view * vec4(light, 1.0));
}