aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authortaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-05-16 00:13:29 +0000
committertaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-05-16 00:13:29 +0000
commit17a153e21767fcc7a67186dd7ef8cdd0a7e26ed2 (patch)
treedbadcfb1a615f355f030add6c4df45563dd5d38f /data
parent789361fb972673d5c1ecca77c4ffb5242ecd493f (diff)
Postprocessing stuff
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@16 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am2
-rw-r--r--data/shaders/postprocess.frag19
2 files changed, 20 insertions, 1 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index beb1463..d65bb52 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,7 +3,7 @@ models_DATA = models/floor models/lander.obj models/randombox models/walle model
models/ceiling models/tiledfloor
shadersdir = $(datadir)/thrust3d/shaders
-shaders_DATA = shaders/lighting.vert shaders/lighting.frag
+shaders_DATA = shaders/lighting.vert shaders/lighting.frag shaders/postprocess.frag
texturesdir = $(datadir)/thrust3d/textures
textures_DATA = textures/floor1.png textures/tiledwall.png
diff --git a/data/shaders/postprocess.frag b/data/shaders/postprocess.frag
new file mode 100644
index 0000000..c475ae9
--- /dev/null
+++ b/data/shaders/postprocess.frag
@@ -0,0 +1,19 @@
+/*
+ * postprocess.frag
+ *
+ * Display post-processing
+ *
+ * (c) 2007-2008 Thomas White <taw27@cam.ac.uk>
+ *
+ * thrust3d - a silly game
+ *
+ */
+
+uniform sampler2D texture;
+
+void main() {
+
+ gl_FragColor = texture2D(texture, gl_TexCoord[0].st) * 0.9;
+
+}
+