summaryrefslogtreecommitdiffstats
path: root/cwd/shaders/face.fs
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-08-20 17:21:29 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-08-20 17:21:29 +0200
commitc62e2cd49649109f0135e56ee8add0dab2254d01 (patch)
tree7e6240186a3801daf0189d1883081b93b5f1eb5c /cwd/shaders/face.fs
parent2017-08-19 (diff)
downloadAltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar
AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar.gz
AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar.bz2
AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar.lz
AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar.xz
AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.tar.zst
AltCraft-c62e2cd49649109f0135e56ee8add0dab2254d01.zip
Diffstat (limited to '')
-rw-r--r--cwd/shaders/face.fs4
1 files changed, 4 insertions, 0 deletions
diff --git a/cwd/shaders/face.fs b/cwd/shaders/face.fs
index 4710f90..6e9d8f0 100644
--- a/cwd/shaders/face.fs
+++ b/cwd/shaders/face.fs
@@ -4,6 +4,7 @@ in VS_OUT {
vec2 UvPosition;
vec4 Texture;
vec3 Color;
+ vec2 Light;
} fs_in;
uniform sampler2D textureAtlas;
@@ -44,4 +45,7 @@ void main() {
vec3 hsvColor = rgb2hsv(gl_FragColor.xyz);
hsvColor+=fs_in.Color;
gl_FragColor = vec4(hsv2rgb(hsvColor),1);
+// gl_FragColor = vec4(fs_in.Light.x / 16.0,0,fs_in.Light.y / 16.0,1);
+ float faceLight = clamp((fs_in.Light.x + fs_in.Light.y) / 16.0,0,16);
+ gl_FragColor = vec4(gl_FragColor.rgb * faceLight,gl_FragColor.a);
} \ No newline at end of file