summaryrefslogtreecommitdiffstats
path: root/cwd/shaders/face.fs
diff options
context:
space:
mode:
Diffstat (limited to 'cwd/shaders/face.fs')
-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