aboutsummaryrefslogtreecommitdiffstats
path: root/shaders
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-05-12 08:03:57 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-05-12 08:03:57 -0400
commit5432b278f8ed8c9aaeccf1ee7a4da540787f965d (patch)
tree3c05fd2ae5cd481610b1e817b0152e12a71f9229 /shaders
parent7487b029fa110388e90fd092bf3c3b9a4dcee08b (diff)
RENDERING
Diffstat (limited to 'shaders')
-rw-r--r--shaders/new.frag6
-rw-r--r--shaders/new.vert3
2 files changed, 6 insertions, 3 deletions
diff --git a/shaders/new.frag b/shaders/new.frag
index 8812d72..fa8a260 100644
--- a/shaders/new.frag
+++ b/shaders/new.frag
@@ -1,9 +1,9 @@
uniform sampler2D sampler;
varying vec2 texCoord;
-varying float join;
+varying vec4 color;
void main(){
- vec4 color = texture2D(sampler, vec2(texCoord.x, texCoord.y));
- gl_FragColor = color;
+ vec4 pixelColor = texture2D(sampler, vec2(texCoord.x, texCoord.y));
+ gl_FragColor = pixelColor * color;
}
diff --git a/shaders/new.vert b/shaders/new.vert
index 1bedfd3..b2fcba4 100644
--- a/shaders/new.vert
+++ b/shaders/new.vert
@@ -2,10 +2,13 @@ attribute vec3 coord2d;
attribute vec2 tex_coord;
uniform mat4 ortho;
+uniform vec4 tex_color;
varying vec2 texCoord;
+varying vec4 color;
void main(){
texCoord = tex_coord;
+ color = tex_color;
gl_Position = ortho * vec4(coord2d.xyz, 1.0);
}