fix(bevy_gltf_components): stop automatically enabling shadows for any light source if it doesn't come from blender (#184)

closes #183
This commit is contained in:
BUGO07 2024-05-03 02:36:57 +04:00 committed by GitHub
parent 6c34ab8bd6
commit 06403153c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,23 +56,17 @@ fn process_lights(
for (mut light, blender_light_shadows) in directional_lights.iter_mut() { for (mut light, blender_light_shadows) in directional_lights.iter_mut() {
if let Some(blender_light_shadows) = blender_light_shadows { if let Some(blender_light_shadows) = blender_light_shadows {
light.shadows_enabled = blender_light_shadows.enabled; light.shadows_enabled = blender_light_shadows.enabled;
} else {
light.shadows_enabled = true;
} }
} }
for (mut light, blender_light_shadows) in spot_lights.iter_mut() { for (mut light, blender_light_shadows) in spot_lights.iter_mut() {
if let Some(blender_light_shadows) = blender_light_shadows { if let Some(blender_light_shadows) = blender_light_shadows {
light.shadows_enabled = blender_light_shadows.enabled; light.shadows_enabled = blender_light_shadows.enabled;
} else {
light.shadows_enabled = true;
} }
} }
for (mut light, blender_light_shadows) in point_lights.iter_mut() { for (mut light, blender_light_shadows) in point_lights.iter_mut() {
if let Some(blender_light_shadows) = blender_light_shadows { if let Some(blender_light_shadows) = blender_light_shadows {
light.shadows_enabled = blender_light_shadows.enabled; light.shadows_enabled = blender_light_shadows.enabled;
} else {
light.shadows_enabled = true;
} }
} }
} }