How do I disable ImageSmoothing in javaFX 3D
18:28 10 Jul 2025

I'm rendering cubes in JavaFX 3D for a voxel-based game. I'm trying to texture the cubes with a diffuseMap, however due to the textures being 32x32 the image is being considerably blurred. Is there a way to turn this off?

//render materials
Image tileSet = new Image("Graphics/tileSet2.png", 0, 0, false, false, false);

tileMaterial = new PhongMaterial();
tileMaterial.setDiffuseMap(tileSet);

As you can see in the code above, I've tried turning off blurring and mipmapping, but it doesn't change anything. I did however try resizing the image to be 1024x1024 and it worked, but it had a more significant drain on performance, and you could still see gaps around the edges of each texture.

java image javafx texture-mapping javafx-3d