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.fs30
1 files changed, 15 insertions, 15 deletions
diff --git a/gfx/gl/shaders/basicShader.fs b/gfx/gl/shaders/basicShader.fs
index fe9a6b3..c20035d 100644
--- a/gfx/gl/shaders/basicShader.fs
+++ b/gfx/gl/shaders/basicShader.fs
@@ -1,15 +1,15 @@
-#version 130
-
-in vec2 texCoord0;
-in vec3 normal0;
-
-uniform sampler2D sampler;
-uniform vec3 lightDirection;
-uniform vec3 lightColor;
-uniform vec3 ambientColor;
-
-void main()
-{
- gl_FragColor = texture(sampler, texCoord0);
- gl_FragColor.rgb *= clamp(ambientColor + (dot(-lightDirection, normal0) * lightColor), 0.0, 1.0);
-}
+#version 130
+
+in vec2 texCoord0;
+in vec3 normal0;
+
+uniform sampler2D sampler;
+uniform vec3 lightDirection;
+uniform vec3 lightColor;
+uniform vec3 ambientColor;
+
+void main()
+{
+ gl_FragColor = texture(sampler, texCoord0);
+ gl_FragColor.rgb *= clamp(ambientColor + (dot(-lightDirection, normal0) * lightColor), 0.0, 1.0);
+}