diff options
author | LaG1924 <lag1924@gmail.com> | 2021-12-05 02:44:37 +0100 |
---|---|---|
committer | LaG1924 <lag1924@gmail.com> | 2021-12-05 02:44:37 +0100 |
commit | 9ffe5b9c171e01a4319e6329bb21e6c05ac3e2b4 (patch) | |
tree | 4a57bd4b644828bc9a688cbad9e198d520f1c906 /cwd/assets/altcraft/shaders/frag/light.fs | |
parent | Added blending (diff) | |
download | AltCraft-9ffe5b9c171e01a4319e6329bb21e6c05ac3e2b4.tar AltCraft-9ffe5b9c171e01a4319e6329bb21e6c05ac3e2b4.tar.gz AltCraft-9ffe5b9c171e01a4319e6329bb21e6c05ac3e2b4.tar.bz2 AltCraft-9ffe5b9c171e01a4319e6329bb21e6c05ac3e2b4.tar.lz AltCraft-9ffe5b9c171e01a4319e6329bb21e6c05ac3e2b4.tar.xz AltCraft-9ffe5b9c171e01a4319e6329bb21e6c05ac3e2b4.tar.zst AltCraft-9ffe5b9c171e01a4319e6329bb21e6c05ac3e2b4.zip |
Diffstat (limited to 'cwd/assets/altcraft/shaders/frag/light.fs')
-rw-r--r-- | cwd/assets/altcraft/shaders/frag/light.fs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cwd/assets/altcraft/shaders/frag/light.fs b/cwd/assets/altcraft/shaders/frag/light.fs index 5b2de5d..d1763f9 100644 --- a/cwd/assets/altcraft/shaders/frag/light.fs +++ b/cwd/assets/altcraft/shaders/frag/light.fs @@ -46,9 +46,8 @@ void main() { lightLevel *= (1.0f - s.r); } lightLevel = clamp(lightLevel, 0.005f, 1.0f); - vec3 faceColor = mix(ac.rgb * lightLevel, vec3(1,1,1) * lightLevel, float(ac.rgb == vec3(0,0,0))); - vec4 finalColor = vec4(c.rgb * faceColor, 1.0f); + vec4 finalColor = vec4(c.rgb * ac.rgb * lightLevel, 1.0f); finalColor.rgb = pow(finalColor.rgb, vec3(1.0f / gamma)); |