wip skybox loading

This commit is contained in:
2025-11-02 12:29:00 -05:00
parent b40fce40a5
commit 3ed3fbd38a
6 changed files with 59 additions and 32 deletions

View File

@@ -36,7 +36,12 @@ impl Plugin for Blackhole {
}
}
fn setup(mut commands: Commands, mut images: ResMut<Assets<Image>>, window: Single<&Window, With<PrimaryWindow>>) {
fn setup(
mut commands: Commands,
mut images: ResMut<Assets<Image>>,
window: Single<&Window, With<PrimaryWindow>>,
asset_server: Res<AssetServer>,
) {
commands.spawn((
PerfUiRoot::default(),
PerfUiEntryFPS::default(),
@@ -70,6 +75,7 @@ fn setup(mut commands: Commands, mut images: ResMut<Assets<Image>>, window: Sing
let img0 = images.add(image.clone());
let img1 = images.add(image);
let skybox = asset_server.load("sky-test.png");
commands.spawn((
Name::new("Render Sprite"),
Sprite {
@@ -97,5 +103,9 @@ fn setup(mut commands: Commands, mut images: ResMut<Assets<Image>>, window: Sing
))
.insert(Camera { order: -1, ..default() });
commands.insert_resource(TracerRenderTextures(img0, img1));
commands.insert_resource(TracerRenderTextures {
main: img0,
secondary: img1,
skybox,
});
}