summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/shaders/frag/face.fs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cwd/assets/altcraft/shaders/frag/face.fs10
1 files changed, 6 insertions, 4 deletions
diff --git a/cwd/assets/altcraft/shaders/frag/face.fs b/cwd/assets/altcraft/shaders/frag/face.fs
index 30d44d2..0eb5a21 100644
--- a/cwd/assets/altcraft/shaders/frag/face.fs
+++ b/cwd/assets/altcraft/shaders/frag/face.fs
@@ -5,14 +5,16 @@ in VS_OUT {
vec3 Color;
} fs_in;
-out vec4 fragColor;
+layout (location = 0) out vec4 color;
+layout (location = 1) out vec4 normal;
uniform sampler2DArray textureAtlas;
void main() {
- vec4 color = texture(textureAtlas,fs_in.Texture);
- if (color.a < 0.3)
+ vec4 col = texture(textureAtlas, fs_in.Texture);
+ if (col.a < 0.3)
discard;
- fragColor = vec4(color.rgb * fs_in.Color, 1.0);
+ color = vec4(col.rgb * fs_in.Color, 1.0f);
+ normal = vec4(1.0f - color.r, 1.0f - color.b, 1.0f, 1.0f);
}