summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/shaders/frag/sky.fs
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-11-21 13:49:23 +0100
committerLaG1924 <lag1924@gmail.com>2021-11-21 15:23:37 +0100
commit0ca11f9bee1cd918acf6ce8247a495442009fec9 (patch)
treed1e791cf44770660eca6783bc3e9c0a2470b7efb /cwd/assets/altcraft/shaders/frag/sky.fs
parentAdded normals to faces (diff)
downloadAltCraft-0ca11f9bee1cd918acf6ce8247a495442009fec9.tar
AltCraft-0ca11f9bee1cd918acf6ce8247a495442009fec9.tar.gz
AltCraft-0ca11f9bee1cd918acf6ce8247a495442009fec9.tar.bz2
AltCraft-0ca11f9bee1cd918acf6ce8247a495442009fec9.tar.lz
AltCraft-0ca11f9bee1cd918acf6ce8247a495442009fec9.tar.xz
AltCraft-0ca11f9bee1cd918acf6ce8247a495442009fec9.tar.zst
AltCraft-0ca11f9bee1cd918acf6ce8247a495442009fec9.zip
Diffstat (limited to 'cwd/assets/altcraft/shaders/frag/sky.fs')
-rw-r--r--cwd/assets/altcraft/shaders/frag/sky.fs14
1 files changed, 10 insertions, 4 deletions
diff --git a/cwd/assets/altcraft/shaders/frag/sky.fs b/cwd/assets/altcraft/shaders/frag/sky.fs
index 53e0cf4..3763bdb 100644
--- a/cwd/assets/altcraft/shaders/frag/sky.fs
+++ b/cwd/assets/altcraft/shaders/frag/sky.fs
@@ -2,7 +2,10 @@
in vec3 pos;
-out vec4 fragColor;
+layout (location = 0) out vec4 color;
+layout (location = 1) out vec4 normal;
+layout (location = 2) out vec4 addColor;
+layout (location = 3) out vec4 light;
uniform sampler2DArray textureAtlas;
uniform float DayTime;
@@ -46,7 +49,10 @@ vec4 Moon() {
void main() {
vec4 starColor = vec4(0.0f, 0.04f, 0.06f, 1.0f);
- fragColor = mix(starColor, DaySkyColor, DayTime);
- fragColor += Sun();
- fragColor += Moon();
+ color = vec4(mix(starColor, DaySkyColor, DayTime).rgb, 1.0f);
+ color += vec4(Sun().rgb, 1.0f);
+ color += vec4(Moon().rgb, 1.0f);
+ normal = vec4(0.0f, 0.0f, 0.0f, 1.0f);
+ addColor = vec4(0.0f, 0.0f, 0.0f, 1.0f);
+ light = vec4(1.0f, 1.0f, 0.0f, 1.0f);
}