Change render_layers example to use point lighting since Bevy 0.8 bug is fixed.

This commit is contained in:
Robin KAY 2023-01-14 02:45:56 +00:00
parent b414243baa
commit a50107426b

View File

@ -66,9 +66,14 @@ fn setup(
material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()), material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()),
..default() ..default()
}); });
commands.insert_resource(AmbientLight { commands.spawn(PointLightBundle {
color: Color::WHITE, point_light: PointLight {
brightness: 1.0, intensity: 1500.0,
shadows_enabled: true,
..default()
},
transform: Transform::from_xyz(4.0, 8.0, 4.0),
..default()
}); });
// Add cameras for different combinations of render-layers // Add cameras for different combinations of render-layers