mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
shaders: Fix transparency on GC7000L (#10036)
Workaround for the missing GL_ALPHA_TEST implementation in Mesa (etnaviv driver).
This commit is contained in:
parent
f27cf47779
commit
44c98089cf
3 changed files with 34 additions and 0 deletions
|
@ -190,6 +190,14 @@ void main(void)
|
|||
#endif
|
||||
vec4 base = texture2D(baseTexture, uv).rgba;
|
||||
|
||||
#ifdef USE_DISCARD
|
||||
// If alpha is zero, we can just discard the pixel. This fixes transparency
|
||||
// on GPUs like GC7000L, where GL_ALPHA_TEST is not implemented in mesa.
|
||||
if (base.a == 0.0) {
|
||||
discard;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_BUMPMAPPING
|
||||
if (use_normalmap) {
|
||||
vec3 L = normalize(lightVec);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue