aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/shaders/chunk.frag
blob: cc03a70b6f86c4c507623804e15be070fd53f77b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#version 330 core
out vec4 FragColor;

in vec2 TexCoord;
in vec2 BTexCoord;
in vec4 DaColor;
in vec4 Viewport;
in mat4 ProjInv;
in vec4 FogColor;
in vec2 FogStartEnd;

uniform sampler2D atlas;
uniform sampler2D lightTex;

void main()
{	
	vec4 texColor = texture(atlas, TexCoord);
	vec4 colorMult = DaColor/256.0;
	
	vec4 lightyColor = texture(lightTex, (BTexCoord + 8.0) / 256.0);
	
	vec4 rasterColor = ((texColor * colorMult) * lightyColor);
	
	FragColor = rasterColor;
}