diff options
author | Tyler Murphy <tylermurphy534@gmail.com> | 2023-01-18 22:43:02 -0500 |
---|---|---|
committer | Tyler Murphy <tylermurphy534@gmail.com> | 2023-01-18 22:43:02 -0500 |
commit | 30cf48cd70f1c52f89362245891be355af110afe (patch) | |
tree | 5cfee873428a8519c5d117917f3abbb3659b631b /public/shader/simple.vert | |
parent | initial (diff) | |
download | webgl-30cf48cd70f1c52f89362245891be355af110afe.tar.gz webgl-30cf48cd70f1c52f89362245891be355af110afe.tar.bz2 webgl-30cf48cd70f1c52f89362245891be355af110afe.zip |
cube
Diffstat (limited to 'public/shader/simple.vert')
-rw-r--r-- | public/shader/simple.vert | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/public/shader/simple.vert b/public/shader/simple.vert index 801b91d..09db32e 100644 --- a/public/shader/simple.vert +++ b/public/shader/simple.vert @@ -1,11 +1,15 @@ precision mediump float; -attribute vec2 position; +attribute vec3 position; attribute vec3 color; +uniform mat4 proj; +uniform mat4 view; +uniform mat4 tran; + varying vec3 color_pass; void main() { color_pass = color; - gl_Position = vec4(position, 0.0, 1.0); + gl_Position = proj * view * tran * vec4(position, 1.0); }
\ No newline at end of file |