opacity hack
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user