fmt + clippy
This commit is contained in:
parent
3542ddcd0c
commit
e0205019ef
@ -147,8 +147,7 @@ fn setup(
|
|||||||
});
|
});
|
||||||
// directional light
|
// directional light
|
||||||
const HALF_SIZE: f32 = 10.0;
|
const HALF_SIZE: f32 = 10.0;
|
||||||
commands
|
commands.spawn_bundle(DirectionalLightBundle {
|
||||||
.spawn_bundle(DirectionalLightBundle {
|
|
||||||
directional_light: DirectionalLight {
|
directional_light: DirectionalLight {
|
||||||
illuminance: 10000.0,
|
illuminance: 10000.0,
|
||||||
shadow_bias_min: 0.00001,
|
shadow_bias_min: 0.00001,
|
||||||
@ -169,8 +168,7 @@ fn setup(
|
|||||||
});
|
});
|
||||||
|
|
||||||
// camera
|
// camera
|
||||||
commands
|
commands.spawn_bundle(PerspectiveCameraBundle {
|
||||||
.spawn_bundle(PerspectiveCameraBundle {
|
|
||||||
transform: Transform::from_xyz(0.0, box_offset, 4.0)
|
transform: Transform::from_xyz(0.0, box_offset, 4.0)
|
||||||
.looking_at(Vec3::new(0.0, box_offset, 0.0), Vec3::Y),
|
.looking_at(Vec3::new(0.0, box_offset, 0.0), Vec3::Y),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
@ -329,6 +329,7 @@ pub struct LightMeta {
|
|||||||
pub shadow_view_bind_group: Option<BindGroup>,
|
pub shadow_view_bind_group: Option<BindGroup>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn prepare_lights(
|
pub fn prepare_lights(
|
||||||
mut commands: Commands,
|
mut commands: Commands,
|
||||||
mut texture_cache: ResMut<TextureCache>,
|
mut texture_cache: ResMut<TextureCache>,
|
||||||
|
@ -183,10 +183,7 @@ impl<'a> TrackedRenderPass<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn draw(&mut self, vertices: Range<u32>, instances: Range<u32>) {
|
pub fn draw(&mut self, vertices: Range<u32>, instances: Range<u32>) {
|
||||||
debug!(
|
debug!("draw: {:?} {:?}", vertices, instances);
|
||||||
"draw: {:?} {:?}",
|
|
||||||
vertices, instances
|
|
||||||
);
|
|
||||||
self.pass.draw(vertices, instances);
|
self.pass.draw(vertices, instances);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ impl<'a> From<&'a Shader> for ShaderModuleDescriptor<'a> {
|
|||||||
label: None,
|
label: None,
|
||||||
source: match shader {
|
source: match shader {
|
||||||
Shader::Wgsl(source) => ShaderSource::Wgsl(source.clone()),
|
Shader::Wgsl(source) => ShaderSource::Wgsl(source.clone()),
|
||||||
Shader::Glsl(source) => {
|
Shader::Glsl(_source) => {
|
||||||
let reflection = shader.reflect().unwrap();
|
let reflection = shader.reflect().unwrap();
|
||||||
let wgsl = reflection.get_wgsl().unwrap();
|
let wgsl = reflection.get_wgsl().unwrap();
|
||||||
ShaderSource::Wgsl(wgsl.into())
|
ShaderSource::Wgsl(wgsl.into())
|
||||||
|
Loading…
Reference in New Issue
Block a user