aboutsummaryrefslogtreecommitdiffstats
path: root/dev/a6-harold/shaders
diff options
context:
space:
mode:
authorKT <tran0563@umn.edu>2021-09-06 19:07:33 -0500
committerKT <tran0563@umn.edu>2021-09-06 19:07:33 -0500
commitcccd3186305915d92b1751dc616979d64116a4aa (patch)
tree5dd4834daef547cd45fc0b643f44a10b581de0ad /dev/a6-harold/shaders
parentAdded missing images for the A6 worksheet (diff)
downloadcsci4611-cccd3186305915d92b1751dc616979d64116a4aa.tar
csci4611-cccd3186305915d92b1751dc616979d64116a4aa.tar.gz
csci4611-cccd3186305915d92b1751dc616979d64116a4aa.tar.bz2
csci4611-cccd3186305915d92b1751dc616979d64116a4aa.tar.lz
csci4611-cccd3186305915d92b1751dc616979d64116a4aa.tar.xz
csci4611-cccd3186305915d92b1751dc616979d64116a4aa.tar.zst
csci4611-cccd3186305915d92b1751dc616979d64116a4aa.zip
Upload a1
Diffstat (limited to '')
-rw-r--r--dev/a6-harold/shaders/artsy.frag29
-rw-r--r--dev/a6-harold/shaders/artsy.vert17
-rw-r--r--dev/a6-harold/shaders/outline.frag7
-rw-r--r--dev/a6-harold/shaders/outline.vert23
-rw-r--r--dev/a6-harold/shaders/stroke2d.frag9
-rw-r--r--dev/a6-harold/shaders/stroke2d.vert7
-rw-r--r--dev/a6-harold/shaders/stroke3d.frag9
-rw-r--r--dev/a6-harold/shaders/stroke3d.vert10
8 files changed, 0 insertions, 111 deletions
diff --git a/dev/a6-harold/shaders/artsy.frag b/dev/a6-harold/shaders/artsy.frag
deleted file mode 100644
index 403009d..0000000
--- a/dev/a6-harold/shaders/artsy.frag
+++ /dev/null
@@ -1,29 +0,0 @@
-#version 330
-
-in vec3 Position;
-in vec3 Normal;
-
-out vec4 color;
-
-uniform vec3 lightPosition;
-uniform vec4 Ia, Id, Is;
-
-uniform vec4 ka, kd, ks;
-uniform float s;
-
-uniform sampler2D diffuseRamp;
-uniform sampler2D specularRamp;
-
-
-void main() {
- vec3 l = normalize(lightPosition.xyz - Position);
- vec3 n = normalize(Normal);
- vec3 e = normalize(-Position);
- vec3 h = normalize(e + l);
- float diffuse = (dot(l,n) + 1)/2;
- float specular = pow(max(dot(n,h),0), s);
- color = ka*Ia
- + kd*Id*texture(diffuseRamp, vec2(diffuse,0))
- + ks*Is*texture(specularRamp, vec2(specular,0));
- color.a = 1;
-}
diff --git a/dev/a6-harold/shaders/artsy.vert b/dev/a6-harold/shaders/artsy.vert
deleted file mode 100644
index cd9b998..0000000
--- a/dev/a6-harold/shaders/artsy.vert
+++ /dev/null
@@ -1,17 +0,0 @@
-#version 330
-
-uniform mat4 modelViewMatrix;
-uniform mat4 normalMatrix;
-uniform mat4 projectionMatrix;
-
-layout(location = 0) in vec3 vertex;
-layout(location = 1) in vec3 normal;
-
-out vec3 Position;
-out vec3 Normal;
-
-void main() {
- Position = (modelViewMatrix * vec4(vertex,1)).xyz;
- Normal = normalize((normalMatrix * vec4(normal,0)).xyz);
- gl_Position = projectionMatrix * modelViewMatrix * vec4(vertex,1);
-}
diff --git a/dev/a6-harold/shaders/outline.frag b/dev/a6-harold/shaders/outline.frag
deleted file mode 100644
index 096721d..0000000
--- a/dev/a6-harold/shaders/outline.frag
+++ /dev/null
@@ -1,7 +0,0 @@
-#version 330
-
-out vec4 color;
-
-void main() {
- color = vec4(0,0,0, 1);
-}
diff --git a/dev/a6-harold/shaders/outline.vert b/dev/a6-harold/shaders/outline.vert
deleted file mode 100644
index a6073e5..0000000
--- a/dev/a6-harold/shaders/outline.vert
+++ /dev/null
@@ -1,23 +0,0 @@
-#version 330
-
-uniform mat4 modelViewMatrix;
-uniform mat4 normalMatrix;
-uniform mat4 projectionMatrix;
-uniform float thickness;
-
-layout(location = 0) in vec3 vertex;
-layout(location = 1) in vec3 normal;
-layout(location = 2) in vec3 leftNormal;
-layout(location = 3) in vec3 rightNormal;
-
-void main() {
- vec3 p = (modelViewMatrix * vec4(vertex,1)).xyz;
- vec3 e = -p;
- vec3 nl = (normalMatrix * vec4(leftNormal,0)).xyz;
- vec3 nr = (normalMatrix * vec4(rightNormal,0)).xyz;
- vec3 v = vertex;
- if (dot(e,nl) * dot(e,nr) < 0.0) {
- v += thickness*normal;
- }
- gl_Position = projectionMatrix * modelViewMatrix * vec4(v,1);
-}
diff --git a/dev/a6-harold/shaders/stroke2d.frag b/dev/a6-harold/shaders/stroke2d.frag
deleted file mode 100644
index 2dd7efa..0000000
--- a/dev/a6-harold/shaders/stroke2d.frag
+++ /dev/null
@@ -1,9 +0,0 @@
-#version 330
-
-uniform vec4 strokeColor;
-
-out vec4 color;
-
-void main() {
- color = strokeColor;
-}
diff --git a/dev/a6-harold/shaders/stroke2d.vert b/dev/a6-harold/shaders/stroke2d.vert
deleted file mode 100644
index e40fdec..0000000
--- a/dev/a6-harold/shaders/stroke2d.vert
+++ /dev/null
@@ -1,7 +0,0 @@
-#version 330
-
-layout(location = 0) in vec3 vertex;
-
-void main() {
- gl_Position = vec4(vertex,1);
-}
diff --git a/dev/a6-harold/shaders/stroke3d.frag b/dev/a6-harold/shaders/stroke3d.frag
deleted file mode 100644
index 2dd7efa..0000000
--- a/dev/a6-harold/shaders/stroke3d.frag
+++ /dev/null
@@ -1,9 +0,0 @@
-#version 330
-
-uniform vec4 strokeColor;
-
-out vec4 color;
-
-void main() {
- color = strokeColor;
-}
diff --git a/dev/a6-harold/shaders/stroke3d.vert b/dev/a6-harold/shaders/stroke3d.vert
deleted file mode 100644
index d333c4f..0000000
--- a/dev/a6-harold/shaders/stroke3d.vert
+++ /dev/null
@@ -1,10 +0,0 @@
-#version 330
-
-uniform mat4 modelViewMatrix;
-uniform mat4 projectionMatrix;
-
-layout(location = 0) in vec3 vertex;
-
-void main() {
- gl_Position = projectionMatrix * modelViewMatrix * vec4(vertex,1);
-}