I’m just trying something out, and I want to apply a small pixel image (10x10px) to a Plane which is 10units square.
The texture scales up correctly, but, it doesn’t retain the sharp pixel edges, which is not the look I’m going for. I tried changing the minFilter & magFilter properties, but that didn’t do it.
Is it possible?
Not even if you set both texture properties to
Thanks @Mugen87 I’d set the min & mag properties on the material, and not the canvas texture, once I’d done that it worked correctly.
Correct code for anyone else looking at this:
let material3 = new THREE.MeshBasicMaterial();
material3.map = new THREE.CanvasTexture(canvas);
material3.map.magFilter = THREE.NearestFilter;
material3.map.minFilter = THREE.NearestFilter;
…but you did apply it to the
CanvasTexture in that snippet.