Spotlights do not cast shadows

This really helps the framerate... to an extent
main
Elijah C. Voigt 1 year ago
parent 6f613d730e
commit b5db24553e

@ -1391,13 +1391,15 @@ fn dissolve_animation(
} }
fn fixup_shadows( fn fixup_shadows(
mut spot_lights: Query<&mut SpotLight>, mut spot_lights: Query<(&mut SpotLight, &Name)>,
mut point_lights: Query<&mut PointLight>, mut point_lights: Query<&mut PointLight>,
mut directional_lights: Query<&mut DirectionalLight>, mut directional_lights: Query<&mut DirectionalLight>,
) { ) {
info!("Fixing up shadows"); info!("Fixing up shadows");
spot_lights.iter_mut().for_each(|mut l| { spot_lights.iter_mut().for_each(|(mut l, n)| {
if n.as_str().starts_with("Spot") {
l.shadows_enabled = true; l.shadows_enabled = true;
}
}); });
point_lights.iter_mut().for_each(|mut l| { point_lights.iter_mut().for_each(|mut l| {
l.shadows_enabled = true; l.shadows_enabled = true;

@ -371,10 +371,14 @@ impl Board {
fn new() -> Board { fn new() -> Board {
Board::from_ascii( Board::from_ascii(
r#".....dqq // r#".....dqq
dpp..pdq // dpp..pdq
qdp..ppd // qdp..ppd
qqd....."#, // qqd....."#,
r#"........
.p...p..
...q....
.p...p.."#,
) )
} }

Loading…
Cancel
Save