This commit is contained in:
2025-10-14 10:18:09 -04:00
parent fd6436a5c9
commit 8f4bd37e1e

View File

@@ -82,18 +82,20 @@ fn setup(mut commands: Commands, mut images: ResMut<Assets<Image>>, window: Sing
commands.spawn((Camera2d, RenderLayers::layer(0))); commands.spawn((Camera2d, RenderLayers::layer(0)));
commands.spawn(( commands
Camera3d::default(), .spawn((
Camera { order: -1, ..default() }, Camera3d::default(),
// Projection::Perspective(PerspectiveProjection { // Camera { order: -1, ..default() },
// aspect_ratio: size.x as f32 / size.y as f32, // Projection::Perspective(PerspectiveProjection {
// ..default() // aspect_ratio: size.x as f32 / size.y as f32,
// }), // ..default()
RTCamera, // }),
RenderLayers::layer(1), RTCamera,
Transform::from_xyz(0.0, 5.0, 20.0).looking_at(Vec3::ZERO, Vec3::Y), RenderLayers::layer(1),
Name::new("RT Camera"), Transform::from_xyz(0.0, 5.0, 20.0).looking_at(Vec3::ZERO, Vec3::Y),
)); Name::new("RT Camera"),
))
.insert(Camera { order: -1, ..default() });
commands.insert_resource(TracerRenderTextures(img0, img1)); commands.insert_resource(TracerRenderTextures(img0, img1));
} }