aboutsummaryrefslogtreecommitdiffstats
path: root/vert.glsl
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2018-05-02 21:22:03 +0100
committerTomasz Kramkowski <tk@the-tk.com>2018-05-02 21:22:03 +0100
commitb659c412263f6dd7df962f7d42f4f51b7c3d5609 (patch)
treee2495e0b1446527b909a9c9fa2776797c7c28221 /vert.glsl
parentec93a8eddf70adef2b1439a511d990021ad25d99 (diff)
downloadfaqe-b659c412263f6dd7df962f7d42f4f51b7c3d5609.tar.gz
faqe-b659c412263f6dd7df962f7d42f4f51b7c3d5609.tar.xz
faqe-b659c412263f6dd7df962f7d42f4f51b7c3d5609.zip
Implement diffuse texture loading and basic material support
Diffstat (limited to 'vert.glsl')
-rw-r--r--vert.glsl2
1 files changed, 2 insertions, 0 deletions
diff --git a/vert.glsl b/vert.glsl
index 5292e99..906408e 100644
--- a/vert.glsl
+++ b/vert.glsl
@@ -7,6 +7,7 @@ layout (location = 2) in vec2 uv;
out vec3 vnorm;
out vec3 fpos;
+out vec2 fuv;
out vec3 lipos;
uniform mat4 model;
@@ -19,6 +20,7 @@ void main()
gl_Position = proj * view * model * vec4(pos, 1.0);
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;
lipos = vec3(view * vec4(light, 1.0));