summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/shaders
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-12-05 02:44:37 +0100
committerLaG1924 <lag1924@gmail.com>2021-12-05 02:44:37 +0100
commit9ffe5b9c171e01a4319e6329bb21e6c05ac3e2b4 (patch)
tree4a57bd4b644828bc9a688cbad9e198d520f1c906 /cwd/assets/altcraft/shaders
parentAdded blending (diff)
downloadAltCraft-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')
-rw-r--r--cwd/assets/altcraft/shaders/frag/entity.fs2
-rw-r--r--cwd/assets/altcraft/shaders/frag/light.fs3
-rw-r--r--cwd/assets/altcraft/shaders/frag/sky.fs2
3 files changed, 3 insertions, 4 deletions
diff --git a/cwd/assets/altcraft/shaders/frag/entity.fs b/cwd/assets/altcraft/shaders/frag/entity.fs
index 6e77a29..31e1a7c 100644
--- a/cwd/assets/altcraft/shaders/frag/entity.fs
+++ b/cwd/assets/altcraft/shaders/frag/entity.fs
@@ -14,6 +14,6 @@ void main() {
color = vec4(entityColor, 1.0f);
normal = vec4(0.0f, 0.0f, 0.0f, 1.0f);
worldPos = entityWorldPos;
- addColor = vec4(0.0f, 0.0f, 0.0f, 1.0f);
+ addColor = vec4(1.0f);
light = vec4(1.0f, 1.0f, 0.0f, 1.0f);
}
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));
diff --git a/cwd/assets/altcraft/shaders/frag/sky.fs b/cwd/assets/altcraft/shaders/frag/sky.fs
index 65a56ad..dc97440 100644
--- a/cwd/assets/altcraft/shaders/frag/sky.fs
+++ b/cwd/assets/altcraft/shaders/frag/sky.fs
@@ -66,6 +66,6 @@ void main() {
color += vec4(Moon().rgb, 1.0f);
normal = vec4(0.0f, 0.0f, 0.0f, 1.0f);
worldPos = vec4(0.0f, 0.0f, 0.0f, 1.0f);
- addColor = vec4(0.0f, 0.0f, 0.0f, 1.0f);
+ addColor = vec4(1.0f);
light = vec4(1.0f, 1.0f, 0.0f, 1.0f);
}