aboutsummaryrefslogtreecommitdiffstats
path: root/shaders
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-05-06 08:04:37 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-05-06 08:04:37 -0400
commitbc92962aff14805d5920f5a82628648d1c1fe4fd (patch)
tree6575a93032745a6493eef677c35996ed1119f6bb /shaders
parentaaf7a6bd286b0d200356ef54148791e2e91ff253 (diff)
Shadaersrsersdfsdf
Diffstat (limited to 'shaders')
-rw-r--r--shaders/new.frag9
-rw-r--r--shaders/new.vert11
-rw-r--r--shaders/world.frag10
-rw-r--r--shaders/world.vert11
4 files changed, 41 insertions, 0 deletions
diff --git a/shaders/new.frag b/shaders/new.frag
new file mode 100644
index 0000000..8812d72
--- /dev/null
+++ b/shaders/new.frag
@@ -0,0 +1,9 @@
+uniform sampler2D sampler;
+
+varying vec2 texCoord;
+varying float join;
+
+void main(){
+ vec4 color = texture2D(sampler, vec2(texCoord.x, texCoord.y));
+ gl_FragColor = color;
+}
diff --git a/shaders/new.vert b/shaders/new.vert
new file mode 100644
index 0000000..1bedfd3
--- /dev/null
+++ b/shaders/new.vert
@@ -0,0 +1,11 @@
+attribute vec3 coord2d;
+attribute vec2 tex_coord;
+
+uniform mat4 ortho;
+
+varying vec2 texCoord;
+
+void main(){
+ texCoord = tex_coord;
+ gl_Position = ortho * vec4(coord2d.xyz, 1.0);
+}
diff --git a/shaders/world.frag b/shaders/world.frag
new file mode 100644
index 0000000..c45b4a0
--- /dev/null
+++ b/shaders/world.frag
@@ -0,0 +1,10 @@
+uniform sampler2D sampler;
+
+varying vec2 texCoord;
+
+void main(){
+ vec4 color = texture2D(sampler, vec2(texCoord.x, 1-texCoord.y));
+ if(color.a <= .1)
+ discard;
+ gl_FragColor = color;
+}
diff --git a/shaders/world.vert b/shaders/world.vert
new file mode 100644
index 0000000..1bedfd3
--- /dev/null
+++ b/shaders/world.vert
@@ -0,0 +1,11 @@
+attribute vec3 coord2d;
+attribute vec2 tex_coord;
+
+uniform mat4 ortho;
+
+varying vec2 texCoord;
+
+void main(){
+ texCoord = tex_coord;
+ gl_Position = ortho * vec4(coord2d.xyz, 1.0);
+}