diff options
Diffstat (limited to 'engine/vertex.glsl')
-rw-r--r-- | engine/vertex.glsl | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/engine/vertex.glsl b/engine/vertex.glsl deleted file mode 100644 index b57caa6..0000000 --- a/engine/vertex.glsl +++ /dev/null @@ -1,24 +0,0 @@ -#version 330 core - -#preinclude "vertex_data.glsl" - -layout (location = 0) in vec3 pos; -layout (location = 1) in vec2 texture_coords; -layout (location = 2) in vec3 normal; - -out VertexData vertex_data; - -uniform mat4 model; -uniform mat4 view; -uniform mat4 projection; - -void main() -{ - gl_Position = projection * view * model * vec4(pos, 1.0); - - vertex_data.world_space_pos = vec3(model * vec4(pos, 1.0)); - vertex_data.texture_coords = texture_coords; - - // TODO: Do this using CPU for performance increase - vertex_data.world_space_normal = mat3(transpose(inverse(model))) * normal; -} |