Migrate assets and configure texture samplers

This commit is contained in:
2026-09-21 19:21:41 +02:00
parent c9434f8ec2
commit e83f1fda2c
9 changed files with 13 additions and 81660 deletions
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
( (
id: TestFighter, id: TestFighter,
model_path: "fighters/test/test_fighter.gltf", model_path: "fighters/test/test.blend",
model_scale: "10.0", model_scale: "10.0",
baked_animation_path: "fighters/test/test.fighterbake", baked_animation_path: "fighters/test/test.fighterbake",
icon: ( icon: (
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
( (
id: TestStage, id: TestStage,
model_path: "stages/battlefield/battlefield.glb#Scene0", model_path: "stages/battlefield/bf2.blend#Scene0",
icon: ( icon: (
path: "stages/battlefield/icon.png" path: "stages/battlefield/icon.png"
), ),
+11 -6
View File
@@ -1,6 +1,7 @@
use bevy::asset::AssetMode::Processed; use bevy::asset::AssetMode::Processed;
#[cfg(feature = "debug_features")] #[cfg(feature = "debug_features")]
use bevy::camera_controller::free_camera::FreeCameraPlugin; use bevy::camera_controller::free_camera::FreeCameraPlugin;
use bevy::gltf::GltfPlugin;
use bevy::image::{ImageAddressMode, ImagePlugin, ImageSamplerDescriptor}; use bevy::image::{ImageAddressMode, ImagePlugin, ImageSamplerDescriptor};
use bevy::prelude::*; use bevy::prelude::*;
#[cfg(feature = "debug_features")] #[cfg(feature = "debug_features")]
@@ -12,14 +13,18 @@ fn main() -> AppExit {
// A `Repeat` sampler so the tileable materials authored in the // A `Repeat` sampler so the tileable materials authored in the
// editor render the same way at runtime; Bevy's default // editor render the same way at runtime; Bevy's default
// `ClampToEdge` smears texture edges on brush geometry. // `ClampToEdge` smears texture edges on brush geometry.
let default_sampler = ImageSamplerDescriptor::linear()
.set_address_mode(ImageAddressMode::Repeat)
.set_anisotropic_filter(16)
.clone();
let default_plugins = DefaultPlugins let default_plugins = DefaultPlugins
.set(ImagePlugin { .set(ImagePlugin {
default_sampler: ImageSamplerDescriptor { default_sampler: default_sampler.clone(),
address_mode_u: ImageAddressMode::Repeat, })
address_mode_v: ImageAddressMode::Repeat, .set(GltfPlugin {
address_mode_w: ImageAddressMode::Repeat, default_sampler,
..ImageSamplerDescriptor::linear() ..default()
},
}) })
.set(AssetPlugin { .set(AssetPlugin {
mode: Processed, mode: Processed,