summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/shaders/frag/liquid_face.fs
blob: 3e5c0d41e0bcfdd00e976726a1ee37c24761d200 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#version 330 core

in vec3 faceTextureUv;
in vec3 faceAddColor;
in vec3 faceNormal;
in vec2 faceLight;
in float faceAmbientOcclusion;

layout (location = 0) out vec4 color;
layout (location = 1) out vec4 normal;
layout (location = 2) out vec4 light;

uniform sampler2DArray textureAtlas;

void main() {
    vec4 col = texture(textureAtlas, faceTextureUv);

    color = vec4(col.rgb * faceAddColor.rgb, 1.0f);
    normal = vec4(faceNormal, 1.0f);
    light = vec4(faceLight / 15.0f, faceAmbientOcclusion, 1.0f);
    color.a = col.a;
}