more fixes to textured transparency

This commit is contained in:
2022-02-25 21:10:38 +08:00
parent 501037d84d
commit 1e74665abc
3 changed files with 12 additions and 0 deletions

View File

@ -1,6 +1,12 @@
#version 330
uniform sampler2D tex;
in vec2 fragTexCoord;
void main() {
if (texture(tex, fragTexCoord).a < 1e-3)
discard;
// gl_FragDepth = gl.FragCoord.z;
}

View File

@ -8,7 +8,10 @@ layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 vertTexCoord;
layout (location = 3) in float light;
out vec2 fragTexCoord;
void main() {
fragTexCoord = vertTexCoord;
gl_Position = lightspace * model * vec4(vert, 1.0);
}