summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-19 23:35:24 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-19 23:35:24 (GMT)
commita7ab414ae12ec4ebd50a1ca3c70d2b5a2d195929 (patch)
tree2f482e61943467b1e2f85aeac556b37aac8d4e2f
parent29efbcaa3a6d461dbe39b6e2fd8d29aeb537165b (diff)
downloadpowder-a7ab414ae12ec4ebd50a1ca3c70d2b5a2d195929.zip
powder-a7ab414ae12ec4ebd50a1ca3c70d2b5a2d195929.tar.gz
Missing shaders from previous commit
-rw-r--r--build/test.frag13
-rw-r--r--build/test.vert17
2 files changed, 30 insertions, 0 deletions
diff --git a/build/test.frag b/build/test.frag
new file mode 100644
index 0000000..5176ed2
--- /dev/null
+++ b/build/test.frag
@@ -0,0 +1,13 @@
+uniform sampler2D fireAlpha; // the texture with the scene you want to blur
+//varying vec2 vTexCoord;
+
+//precision mediump float;
+//uniform sampler2D tex;
+//varying float vAlpha;
+
+in vec2 gl_PointCoord;
+
+void main () {
+ vec4 texColor = texture2D(fireAlpha, gl_PointCoord);
+ gl_FragColor = vec4(gl_Color.rgb, texColor.a*gl_Color.a);
+}
diff --git a/build/test.vert b/build/test.vert
new file mode 100644
index 0000000..e8a4c32
--- /dev/null
+++ b/build/test.vert
@@ -0,0 +1,17 @@
+varying vec2 vTexCoord;
+
+// remember that you should draw a screen aligned quad
+void main(void)
+{
+ gl_Position = ftransform();;
+
+ // Clean up inaccuracies
+ //vec2 Pos;
+ //Pos = sign(gl_Vertex.xy);
+
+ //gl_Position = vec4(Pos, 0.0, 1.0);
+ // Image-space
+ //vTexCoord = gl_Vertex.xy * 0.1;//Pos * 0.1;// + 0.5;
+ //gl_Position = gl_Vertex;
+ gl_FrontColor = gl_Color;
+}