javafxperspectivecamera

Road texture is blurred where camera is far


I am trying to develop a car race game using JavaFX. I am using perspective camera. I am using PointLight as well. The road gets blurred where the camera is far. How can I avoid this blurring? My camera settings are below:

PerspectiveCamera camera = new PerspectiveCamera(true);
camera.setNearClip(5);
camera.setFarClip(1000);
camera.setFieldOfView(20);

PointLight pointLight = new PointLight(Color.WHITE); 
pointLight.setTranslateY(-500);
root3D.getChildren().add(pointLight);
pointLight.translateXProperty().bind(cameraPosition.xProperty());
pointLight.translateZProperty().bind(cameraPosition.zProperty());

SubScene subScene = new SubScene(root3D, 1920, 1080, true, SceneAntialiasing.BALANCED);
subScene.setCamera(camera);

Screenshot


Solution

  • Ok, when I disabled Anti-aliasing using:

    SubScene subScene = new SubScene(root3D, 1920, 1080, true, SceneAntialiasing.DISABLED);