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/face.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/face.fs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/cwd/assets/altcraft/shaders/frag/face.fs b/cwd/assets/altcraft/shaders/frag/face.fs index 2120697..57ea0ec 100644 --- a/cwd/assets/altcraft/shaders/frag/face.fs +++ b/cwd/assets/altcraft/shaders/frag/face.fs @@ -1,21 +1,24 @@ #version 330 core -in VS_OUT { - vec3 Texture; - vec3 Color; - vec3 faceNormal; -} fs_in; +in vec3 faceTexture; +in vec3 faceAddColor; +in vec3 faceNormal; +in vec2 faceLight; 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; void main() { - vec4 col = texture(textureAtlas, fs_in.Texture); + vec4 col = texture(textureAtlas, faceTexture); if (col.a < 0.3) discard; - color = vec4(col.rgb * fs_in.Color, 1.0f); - normal = vec4(fs_in.faceNormal, 1.0f); + color = vec4(col.rgb, 1.0f); + normal = vec4(faceNormal, 1.0f); + addColor = vec4(faceAddColor, 1.0f); + light = vec4(faceLight / 15.0f, 0.0f, 1.0f); } |