diff options
author | ccolin | 2020-12-28 17:36:45 +0100 |
---|---|---|
committer | ccolin | 2020-12-28 17:36:45 +0100 |
commit | f3a34665978729ef65010ac2a4a9408e27d5bf3e (patch) | |
tree | e8f4d6f2402c9b7113e33684f64b82a98d990313 /shaders/main.vert | |
parent | ef37119f4e94c83a6357ebc0b94a39e4e53b20d7 (diff) |
skybox
Diffstat (limited to 'shaders/main.vert')
-rw-r--r-- | shaders/main.vert | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/shaders/main.vert b/shaders/main.vert new file mode 100644 index 0000000..33e6849 --- /dev/null +++ b/shaders/main.vert @@ -0,0 +1,20 @@ +#version 330 core + +layout(location = 0) in vec3 in_pos; +layout(location = 1) in vec3 in_norm; +layout(location = 2) in vec2 in_uv; + +out vec3 norm; +out vec2 uv; +out vec3 frag_pos; + +uniform mat4 proj; +uniform mat4 view; +uniform mat4 model; + +void main() { + gl_Position = proj * view * model * vec4(in_pos, 1.0); + norm = in_norm; + uv = in_uv; + frag_pos = vec3(model * vec4(in_pos, 1.0)); +} |