Hello, I’m adding a texture to a material.
this is the material
new MeshStandardMaterial( {color: 0x00ff4a, emissive:0xca3131} ),
The texture looks like this
I’m adding it to a material in this way:
material.alphaTest = 0.35;
material.alphaMap = textures[key];
material.alphaMap.magFilter = NearestFilter;
material.alphaMap.wrapT = RepeatWrapping;
material.alphaMap.repeat.y = 1;
I’m using the same texture as map texture and as alpha map.
The problem that I’m having is that, when zooming, the texture is really pixeletated
I was wonder how to mitigate this effect, how to have a kind of blending.
I’ve read this
https://medium.com/@bgolus/anti-aliased-alpha-test-the-esoteric-alpha-to-coverage-8b177335ae4f
And I’ve tried to set the sample alpha to coverage variable in the renderer like this
const gl = renderer.getContext();
gl.enable(gl.SAMPLE_ALPHA_TO_COVERAGE);
But it is not working, I obtain a strange effect: