opacity hack
This commit is contained in:
@@ -56,10 +56,9 @@ uniform sampler2D u_texture;
|
|||||||
out vec4 fragColor;
|
out vec4 fragColor;
|
||||||
void main() {
|
void main() {
|
||||||
vec4 texColor = texture(u_texture, v_uv);
|
vec4 texColor = texture(u_texture, v_uv);
|
||||||
if (texColor.a < 0.1) discard;
|
if (texColor.a < 0.5) discard;
|
||||||
fragColor = vec4(texColor.rgb * v_color * v_light, texColor.a);
|
fragColor = vec4(texColor.rgb * v_color * v_light, 1.0);
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
|
|
||||||
function compileShader(gl, type, src) {
|
function compileShader(gl, type, src) {
|
||||||
const shader = gl.createShader(type);
|
const shader = gl.createShader(type);
|
||||||
|
|||||||
Reference in New Issue
Block a user