我正在尝试使用 JavaFX 开发一款赛车游戏。我正在使用透视相机。我也在使用点光源。相机越远,道路就越模糊。我怎样才能避免这种模糊?我的相机设置如下:
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);
好的,当我使用以下方法禁用抗锯齿时:
SubScene subScene = new SubScene(root3D, 1920, 1080, true, SceneAntialiasing.DISABLED);