From b6dfe86cadaa9e38b4265d69972fb7dff5b73fff Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Thu, 9 Aug 2018 07:50:40 +0500 Subject: Changeable brightness --- cwd/shaders/face.fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cwd') diff --git a/cwd/shaders/face.fs b/cwd/shaders/face.fs index 62a2d37..4872f06 100644 --- a/cwd/shaders/face.fs +++ b/cwd/shaders/face.fs @@ -10,6 +10,7 @@ in VS_OUT { uniform sampler2DArray textureAtlas; uniform vec2 windowSize; uniform float DayTime; +uniform float MinLightLevel; vec3 rgb2hsv(vec3 c) { @@ -41,7 +42,7 @@ void main() { float light = fs_in.Light.x / 15.0; float skyLight = (fs_in.Light.y / 15.0) * DayTime; - float faceLight = clamp(light + skyLight,0.2,1.0); + float faceLight = clamp(light + skyLight,MinLightLevel,1.0); color = vec4(color.rgb * faceLight, color.a); gl_FragColor = color; -- cgit v1.2.3