summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-02-24 14:27:54 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-02-24 14:27:54 +0800
commitef43c9a5e3bccd2df7bf2e441980be9996eda9d2 (patch)
treec7ef2b136d6776beb5c4efdc7bcec244588557af
parenta9dad0448ae9abd0666b0fd9932068486777424e (diff)
downloadglsl-ef43c9a5e3bccd2df7bf2e441980be9996eda9d2.tar.gz
glsl-ef43c9a5e3bccd2df7bf2e441980be9996eda9d2.tar.bz2
Adapt for new core API
-rw-r--r--CompizShader/shader_fragment_simple17
1 files changed, 15 insertions, 2 deletions
diff --git a/CompizShader/shader_fragment_simple b/CompizShader/shader_fragment_simple
index 5dba13d..f2a631d 100644
--- a/CompizShader/shader_fragment_simple
+++ b/CompizShader/shader_fragment_simple
@@ -1,4 +1,17 @@
-void main()
+varying float intensity;
+
+void main()
{
- gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);
+ vec4 color;
+
+ if (intensity > 0.95)
+ color = vec4(1.0,0.5,0.5,1.0);
+ else if (intensity > 0.5)
+ color = vec4(0.6,0.3,0.3,1.0);
+ else if (intensity > 0.25)
+ color = vec4(0.4,0.2,0.2,1.0);
+ else
+ color = vec4(0.2,0.1,0.1,1.0);
+
+ gl_FragColor = color;
}