opacity hack

This commit is contained in:
David Allemang
2026-07-06 14:48:55 -04:00
parent a6cedbc429
commit 70817082e3

View File

@@ -56,10 +56,9 @@ uniform sampler2D u_texture;
out vec4 fragColor;
void main() {
vec4 texColor = texture(u_texture, v_uv);
if (texColor.a < 0.1) discard;
fragColor = vec4(texColor.rgb * v_color * v_light, texColor.a);
}
`;
if (texColor.a < 0.5) discard;
fragColor = vec4(texColor.rgb * v_color * v_light, 1.0);
}`;
function compileShader(gl, type, src) {
const shader = gl.createShader(type);