|
|
|
@ -272,6 +272,14 @@ fn update_tweaks(
|
|
|
|
With<Display3d>,
|
|
|
|
With<Display3d>,
|
|
|
|
>,
|
|
|
|
>,
|
|
|
|
tweaks: Res<Assets<Tweakfile>>,
|
|
|
|
tweaks: Res<Assets<Tweakfile>>,
|
|
|
|
|
|
|
|
mut lights: Query<
|
|
|
|
|
|
|
|
(
|
|
|
|
|
|
|
|
Option<&mut SpotLight>,
|
|
|
|
|
|
|
|
Option<&mut PointLight>,
|
|
|
|
|
|
|
|
Option<&mut DirectionalLight>,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Or<(With<SpotLight>, With<PointLight>, With<DirectionalLight>)>,
|
|
|
|
|
|
|
|
>,
|
|
|
|
mut commands: Commands,
|
|
|
|
mut commands: Commands,
|
|
|
|
server: Res<AssetServer>,
|
|
|
|
server: Res<AssetServer>,
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
@ -302,6 +310,11 @@ fn update_tweaks(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
lights
|
|
|
|
|
|
|
|
.iter_mut()
|
|
|
|
|
|
|
|
.for_each(|(mut spot, mut point, mut direction)| {
|
|
|
|
|
|
|
|
// Depending on the light, set the scalar tweak
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -871,6 +884,8 @@ pub(crate) mod tweaks {
|
|
|
|
pub msaa: MsaaTweaks,
|
|
|
|
pub msaa: MsaaTweaks,
|
|
|
|
#[serde(default)]
|
|
|
|
#[serde(default)]
|
|
|
|
pub models: ModelTweaks,
|
|
|
|
pub models: ModelTweaks,
|
|
|
|
|
|
|
|
#[serde(default)]
|
|
|
|
|
|
|
|
pub lights: LightTweaks,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Deserialize, Default)]
|
|
|
|
#[derive(Debug, Deserialize, Default)]
|
|
|
|
@ -1110,4 +1125,11 @@ pub(crate) mod tweaks {
|
|
|
|
pub dots_red: String,
|
|
|
|
pub dots_red: String,
|
|
|
|
pub dots_blue: String,
|
|
|
|
pub dots_blue: String,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Deserialize, Default, Clone)]
|
|
|
|
|
|
|
|
pub(crate) struct LightTweaks {
|
|
|
|
|
|
|
|
pub spot_light_scale: f32,
|
|
|
|
|
|
|
|
pub point_light_scale: f32,
|
|
|
|
|
|
|
|
pub directional_light_scale: f32,
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|