Skip to content

Commit ce416c3

Browse files
authored
Use bevy::light in examples instead of bevy::pbr::light re-export (#20487)
# Objective - Prepare for removing re-exports ## Solution - title ## Testing - cargo check --examples --all-features
1 parent e98a14e commit ce416c3

32 files changed

+44
-41
lines changed

examples/3d/anti_aliasing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use bevy::{
1111
},
1212
core_pipeline::prepass::{DepthPrepass, MotionVectorPrepass},
1313
image::{ImageSampler, ImageSamplerDescriptor},
14-
pbr::CascadeShadowConfigBuilder,
14+
light::CascadeShadowConfigBuilder,
1515
prelude::*,
1616
render::{
1717
camera::{MipBias, TemporalJitter},

examples/3d/atmosphere.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use std::f32::consts::PI;
55
use bevy::{
66
camera::Exposure,
77
core_pipeline::{bloom::Bloom, tonemapping::Tonemapping},
8-
pbr::{light_consts::lux, Atmosphere, AtmosphereSettings, CascadeShadowConfigBuilder},
8+
light::{light_consts::lux, CascadeShadowConfigBuilder},
9+
pbr::{Atmosphere, AtmosphereSettings},
910
prelude::*,
1011
};
1112

examples/3d/atmospheric_fog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! | `S` | Toggle Directional Light Fog Influence |
99
1010
use bevy::{
11-
pbr::{CascadeShadowConfigBuilder, NotShadowCaster},
11+
light::{CascadeShadowConfigBuilder, NotShadowCaster},
1212
prelude::*,
1313
};
1414

examples/3d/color_grading.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{
77

88
use bevy::{
99
ecs::system::EntityCommands,
10-
pbr::CascadeShadowConfigBuilder,
10+
light::CascadeShadowConfigBuilder,
1111
prelude::*,
1212
render::view::{ColorGrading, ColorGradingGlobal, ColorGradingSection, Hdr},
1313
};

examples/3d/deferred_rendering.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ use bevy::{
66
anti_aliasing::fxaa::Fxaa,
77
core_pipeline::prepass::{DeferredPrepass, DepthPrepass, MotionVectorPrepass, NormalPrepass},
88
image::ImageLoaderSettings,
9-
math::ops,
10-
pbr::{
11-
CascadeShadowConfigBuilder, DefaultOpaqueRendererMethod, DirectionalLightShadowMap,
12-
NotShadowCaster, NotShadowReceiver, OpaqueRendererMethod,
9+
light::{
10+
CascadeShadowConfigBuilder, DirectionalLightShadowMap, NotShadowCaster, NotShadowReceiver,
1311
},
12+
math::ops,
13+
pbr::{DefaultOpaqueRendererMethod, OpaqueRendererMethod},
1414
prelude::*,
1515
};
1616

examples/3d/edit_material_on_gltf.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ use bevy::{
66
audio::AudioPlugin,
77
color::{palettes, Color},
88
gltf::GltfAssetLabel,
9+
light::DirectionalLight,
910
math::{Dir3, Vec3},
10-
pbr::{DirectionalLight, MeshMaterial3d, StandardMaterial},
11+
pbr::{MeshMaterial3d, StandardMaterial},
1112
prelude::{Camera3d, Children, Commands, Component, On, Query, Res, ResMut, Transform},
1213
scene::{SceneInstanceReady, SceneRoot},
1314
DefaultPlugins,

examples/3d/fog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
//! | `.` / `?` | Adjust Fog Alpha Channel |
2323
2424
use bevy::{
25+
light::{NotShadowCaster, NotShadowReceiver},
2526
math::ops,
26-
pbr::{NotShadowCaster, NotShadowReceiver},
2727
prelude::*,
2828
};
2929

examples/3d/fog_volumes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//! light.
77
88
use bevy::{
9+
light::{FogVolume, VolumetricFog, VolumetricLight},
910
math::vec3,
10-
pbr::{FogVolume, VolumetricFog, VolumetricLight},
1111
prelude::*,
1212
render::view::Hdr,
1313
};

examples/3d/irradiance_volumes.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
use bevy::{
1717
color::palettes::css::*,
1818
core_pipeline::Skybox,
19+
light::{IrradianceVolume, NotShadowCaster},
1920
math::{uvec3, vec3},
20-
pbr::{
21-
irradiance_volume::IrradianceVolume, ExtendedMaterial, MaterialExtension, NotShadowCaster,
22-
},
21+
pbr::{ExtendedMaterial, MaterialExtension},
2322
prelude::*,
2423
render::render_resource::{AsBindGroup, ShaderRef, ShaderType},
2524
window::PrimaryWindow,

examples/3d/light_textures.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ use bevy::{
77
camera::primitives::CubemapLayout,
88
color::palettes::css::{SILVER, YELLOW},
99
input::mouse::AccumulatedMouseMotion,
10-
pbr::{decal, DirectionalLightTexture, NotShadowCaster, PointLightTexture, SpotLightTexture},
10+
light::{DirectionalLightTexture, NotShadowCaster, PointLightTexture, SpotLightTexture},
11+
pbr::decal,
1112
prelude::*,
1213
render::renderer::{RenderAdapter, RenderDevice},
1314
window::{CursorIcon, SystemCursorIcon},

0 commit comments

Comments
 (0)