summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/waterShader.fs
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shaders/waterShader.fs')
-rw-r--r--gfx/gl/shaders/waterShader.fs13
1 files changed, 13 insertions, 0 deletions
diff --git a/gfx/gl/shaders/waterShader.fs b/gfx/gl/shaders/waterShader.fs
new file mode 100644
index 0000000..bdfbc33
--- /dev/null
+++ b/gfx/gl/shaders/waterShader.fs
@@ -0,0 +1,13 @@
+#version 130
+
+in vec2 texCoord0;
+in float depth;
+
+uniform sampler2D sampler;
+uniform vec3 waves;
+
+void main()
+{
+ gl_FragColor = texture(sampler, texCoord0);
+ gl_FragColor.a *= clamp(-depth * .7, .1, 1.0);
+}