Skip to content

Commit

Permalink
add shadows in examples (#3201)
Browse files Browse the repository at this point in the history
# Objective

- As mentioned in #3126, shadows need to be readded in examples

## Solution

- Add shadows in examples
  • Loading branch information
mockersf committed Nov 27, 2021
1 parent 7ced541 commit e8412df
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/3d/3d_scene_pipelined.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ fn setup(
point_light: PointLight {
intensity: 1600.0, // lumens - roughly a 100W non-halogen incandescent bulb
color: Color::RED,
shadows_enabled: true,
..Default::default()
},
..Default::default()
Expand Down Expand Up @@ -144,6 +145,7 @@ fn setup(
point_light: PointLight {
intensity: 1600.0, // lumens - roughly a 100W non-halogen incandescent bulb
color: Color::GREEN,
shadows_enabled: true,
..Default::default()
},
..Default::default()
Expand Down Expand Up @@ -171,6 +173,7 @@ fn setup(
point_light: PointLight {
intensity: 1600.0, // lumens - roughly a 100W non-halogen incandescent bulb
color: Color::BLUE,
shadows_enabled: true,
..Default::default()
},
..Default::default()
Expand Down Expand Up @@ -204,6 +207,7 @@ fn setup(
far: 10.0 * HALF_SIZE,
..Default::default()
},
shadows_enabled: true,
..Default::default()
},
transform: Transform {
Expand Down
1 change: 1 addition & 0 deletions examples/3d/load_gltf_pipelined.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
far: 10.0 * HALF_SIZE,
..Default::default()
},
shadows_enabled: true,
..Default::default()
},
..Default::default()
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/shadow_biases_pipelined.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ fn setup(
color: Color::WHITE,
shadow_depth_bias: 0.0,
shadow_normal_bias: 0.0,
shadows_enabled: true,
..Default::default()
},
..Default::default()
Expand All @@ -90,6 +91,7 @@ fn setup(
},
shadow_depth_bias: 0.0,
shadow_normal_bias: 0.0,
shadows_enabled: true,
..Default::default()
},
transform: Transform::from_matrix(light_transform),
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/shadow_caster_receiver_pipelined.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ fn setup(
intensity: 0.0,
range: spawn_plane_depth,
color: Color::WHITE,
shadows_enabled: true,
..Default::default()
},
..Default::default()
Expand All @@ -112,6 +113,7 @@ fn setup(
far: 50.0,
..Default::default()
},
shadows_enabled: true,
..Default::default()
},
transform: Transform::from_matrix(light_transform),
Expand Down

0 comments on commit e8412df

Please sign in to comment.