summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/basicShader.fs
blob: 0d0b904ad2401b5856ddace5ac9d748ca476a80d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#version 330 core

in vec3 FragPos;
in vec2 TexCoords;
in vec3 Normal;
in vec4 Colour;
include(`geometryOut.glsl')

uniform sampler2D texture0;

void
main()
{
	vec4 textureColour = texture(texture0, TexCoords);
	float clear = round(mix(textureColour.a, 1, Colour.a));
	gPosition = vec4(FragPos, clear);
	gNormal = vec4(Normal, clear);
	gAlbedoSpec = mix(textureColour, vec4(Colour.rgb, 1), Colour.a);
}