blob: a059fab955c4879678cdd45acf22df96b5812ecd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#version 330 core
in vec2 texCoord;
uniform sampler2D tex;
out vec4 fragColor;
void main()
{
vec4 c = texture(tex, texCoord);
// This discard, while not necessarily ideal for some GPUs, is necessary to
// get correct results with certain layer blend modes for example.
if (c.a == 0.0)
discard;
fragColor = c;
}
|