diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-09-21 20:31:17 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-09-21 20:34:43 -0400 |
commit | a700f36d804e9c6c64bdb4aa00bd7a039f3f553e (patch) | |
tree | c890b3348a8c07e718300685edfc6f562ca0c17e /data/shaders/skybox-vert.glsl | |
parent | a4f403625aa06197f9cd724da9f50dda47c216cc (diff) |
Add missing skybox shader files.
Oopsies!
Diffstat (limited to 'data/shaders/skybox-vert.glsl')
-rw-r--r-- | data/shaders/skybox-vert.glsl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/data/shaders/skybox-vert.glsl b/data/shaders/skybox-vert.glsl new file mode 100644 index 0000000..312fcd6 --- /dev/null +++ b/data/shaders/skybox-vert.glsl @@ -0,0 +1,25 @@ +// -*- mode: c -*- + +#ifdef GLSL330 +layout (location = 0) in vec3 position; +#elif defined(GLSL130) +in vec3 position; +#elif defined(GLSL120) +attribute vec3 position; +#endif + +#ifdef GLSL120 +varying vec3 fragDir; +#else +out vec3 fragDir; +#endif + +uniform mat4 view; +uniform mat4 projection; + +void main() { + // Remove the translation part of the view matrix. + mat4 viewDir = mat4(mat3(view)); + fragDir = position; + gl_Position = projection * viewDir * vec4(position, 1.0); +} |