summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/basicShader.fs
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shaders/basicShader.fs')
-rw-r--r--gfx/gl/shaders/basicShader.fs13
1 files changed, 13 insertions, 0 deletions
diff --git a/gfx/gl/shaders/basicShader.fs b/gfx/gl/shaders/basicShader.fs
new file mode 100644
index 0000000..3aa974f
--- /dev/null
+++ b/gfx/gl/shaders/basicShader.fs
@@ -0,0 +1,13 @@
+#version 120
+
+varying vec2 texCoord0;
+varying vec3 normal0;
+
+uniform sampler2D sampler;
+uniform vec3 lightDirection;
+
+void main()
+{
+ gl_FragColor = texture2D(sampler, texCoord0) *
+ clamp(dot(-lightDirection, normal0), 0.0, 1.0);
+}