enable FXAA anti aliasing

This commit is contained in:
yuni 2024-10-28 05:43:08 +01:00
parent b69f5945af
commit 5d664bf2c7

View file

@ -68,6 +68,8 @@ impl Plugin for CameraPlugin {
app.add_systems(PreUpdate, apply_input_to_player.run_if(game_running));
app.insert_resource(MapCam::default());
app.insert_resource(Msaa::Off);
// To center the renderer origin on the player camera,
// 1. Disable bevy_xpbd's position->transform sync function
app.insert_resource(sync::SyncConfig {
@ -132,6 +134,16 @@ pub fn setup_camera(mut commands: Commands, settings: Res<var::Settings>) {
transform: Transform::from_xyz(0.0, 0.0, 8.0).looking_at(Vec3::ZERO, Vec3::Y),
..default()
},
bevy::core_pipeline::fxaa::Fxaa {
edge_threshold: bevy::core_pipeline::fxaa::Sensitivity::Extreme,
..default()
},
//bevy::core_pipeline::smaa::SmaaSettings::default(),
// bevy::core_pipeline::experimental::taa::TemporalAntiAliasBundle::default(),
// bevy::core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings {
// enabled: true,
// ..default()
// },
BloomSettings {
composite_mode: BloomCompositeMode::EnergyConserving,
..default()