I have a 64x64 pixel texture that consists of white and transparent pixels and should be used as an overlay. The problem is that the texture is stretched and the rendering has to be pixel-perfect. But when the texture is rendered the edges between white and transparent pixels are interpolated but they have to be sharp edges. How do I disable interpolation for this specific material?
Material definition:
this._groundOverlayMaterial = new THREE.MeshBasicMaterial({
color: 0xffffff,
transparent: true
});
The map is created separately using a canvas and then set using:
this._groundOverlayMaterial.map = new THREE.TextureLoader().load(overlayCtx.canvas.toDataURL('image/png'));
this._groundOverlayMaterial.needsUpdate = true;
Info: The mesh is a simple plane with no subdivisions