2020-01-21 18:11:15 +01:00
|
|
|
void fragment() {
|
2020-08-29 19:55:16 +01:00
|
|
|
// Bypasses zTexture because only alpha is queried.
|
2020-08-28 00:04:44 +01:00
|
|
|
if (texture2D(TEXTURE, UV).a == 0.0) {
|
2020-01-21 18:11:15 +01:00
|
|
|
discard; // Discard if no alpha so that there's a hole in the stencil buffer.
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-28 00:04:44 +01:00
|
|
|
COLOR = vec4(0.0);
|
2020-01-21 18:11:15 +01:00
|
|
|
}
|