diff options
author | LaG1924 <lag1924@gmail.com> | 2021-11-21 13:49:23 +0100 |
---|---|---|
committer | LaG1924 <lag1924@gmail.com> | 2021-11-21 15:23:37 +0100 |
commit | 0ca11f9bee1cd918acf6ce8247a495442009fec9 (patch) | |
tree | d1e791cf44770660eca6783bc3e9c0a2470b7efb /cwd/assets/altcraft/shaders/frag/sky.fs | |
parent | Added normals to faces (diff) | |
download | AltCraft-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 '')
-rw-r--r-- | cwd/assets/altcraft/shaders/frag/sky.fs | 14 |
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); } |