diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2018-10-19 23:22:07 +0300 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2018-10-19 23:30:23 +0300 |
commit | 7c1edef3ac501d40e3de495b9434df71f535e9bc (patch) | |
tree | fd7f4264bdf5c30f7182a147ed9e6c7935c69bf2 /vert.glsl | |
parent | 91b543a29cb8852251908a49cd120a6f7d9f2f11 (diff) | |
download | faqe-7c1edef3ac501d40e3de495b9434df71f535e9bc.tar.gz faqe-7c1edef3ac501d40e3de495b9434df71f535e9bc.tar.xz faqe-7c1edef3ac501d40e3de495b9434df71f535e9bc.zip |
Allow multiple shaders while reducing duplication
This change also stops using bie as eventually it will be replaced with
a more sophisticated asset handling system which will also allow custom
shaders.
Diffstat (limited to 'vert.glsl')
-rw-r--r-- | vert.glsl | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/vert.glsl b/vert.glsl deleted file mode 100644 index 19469a4..0000000 --- a/vert.glsl +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 fnorm; -out vec3 fpos; -out vec2 fuv; -out vec3 lipos; - -uniform mat4 model; -uniform mat4 view; -uniform mat4 proj; -uniform vec3 light; - -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 - fnorm = mat3(transpose(inverse(view * model))) * norm; - lipos = vec3(view * vec4(light, 1.0)); -} |