summaryrefslogtreecommitdiff
path: root/mainv.glsl
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2021-09-29 11:38:37 -0400
committerpommicket <pommicket@gmail.com>2021-09-29 11:38:37 -0400
commit0b9cd314267fb3f654959ed4a33e604b4bfb4fa3 (patch)
tree0edf99621c19870f5ee5e9275116fc52efb4b1a9 /mainv.glsl
parent685bc525dec7b5582aee24ca97f6e2d49a25807a (diff)
new idea: function sandbox
Diffstat (limited to 'mainv.glsl')
-rw-r--r--mainv.glsl29
1 files changed, 0 insertions, 29 deletions
diff --git a/mainv.glsl b/mainv.glsl
deleted file mode 100644
index b26ee6f..0000000
--- a/mainv.glsl
+++ /dev/null
@@ -1,29 +0,0 @@
-attribute vec3 v_pos;
-attribute vec3 v_normal;
-uniform mat4 u_transform;
-uniform vec3 u_offset;
-uniform vec3 u_scale;
-uniform float u_yaw, u_pitch;
-
-varying vec3 normal;
-
-void main() {
- float cy = cos(u_yaw), sy = sin(u_yaw);
- float cp = cos(u_pitch), sp = sin(u_pitch);
- float x = v_pos.x, y = v_pos.y, z = v_pos.z;
- vec3 pos;
- pos = vec3(
- x,
- cp * y - sp * z,
- sp * y + cp * z
- );
- x = pos.x; y = pos.y; z = pos.z;
- pos = vec3(
- +cy * x + sy * z,
- y,
- -sy * x + cy * z
- );
-
- gl_Position = u_transform * vec4(pos * u_scale + u_offset, 1.0);
- normal = v_normal;
-}