diff options
Diffstat (limited to 'mesh_loading_test/shaders')
-rw-r--r-- | mesh_loading_test/shaders/default.fs | 13 | ||||
-rw-r--r-- | mesh_loading_test/shaders/default.vs | 16 |
2 files changed, 29 insertions, 0 deletions
diff --git a/mesh_loading_test/shaders/default.fs b/mesh_loading_test/shaders/default.fs new file mode 100644 index 0000000..bdd4b9a --- /dev/null +++ b/mesh_loading_test/shaders/default.fs @@ -0,0 +1,13 @@ +#version 330 core + +in vec2 tex_coords; + +out vec4 frag_color; + +uniform sampler2D texture1; + +void +main(void) +{ + frag_color = texture(texture1, tex_coords); +} diff --git a/mesh_loading_test/shaders/default.vs b/mesh_loading_test/shaders/default.vs new file mode 100644 index 0000000..90e883a --- /dev/null +++ b/mesh_loading_test/shaders/default.vs @@ -0,0 +1,16 @@ +#version 330 core +layout(location = 0) in vec3 apos; +layout(location = 2) in vec2 atex_coords; + +out vec2 tex_coords; + +uniform mat4 projection; +uniform mat4 view; +uniform mat4 model; + +void +main(void) +{ + tex_coords = atex_coords; + gl_Position = projection*view*model*vec4(apos, 1.0); +} |