Started light tweaks

main
Elijah Voigt 2 years ago
parent 0511b8520a
commit 13a2e9f0a0

@ -41,6 +41,14 @@ invalid = "/sfx/3D/3DInvalidMove"
### ###
msaa = "Off" msaa = "Off"
###
# Screen Space Ambient Occlusion
# https://docs.rs/bevy/0.11.3/bevy/pbr/enum.ScreenSpaceAmbientOcclusionQualityLevel.html
# Options: Off, Low, Medium, High, Ultra
# Requires: display3d.msaa = "Off"
###
ssoa.quality_level = "Off"
[display3d.models] [display3d.models]
assets_file = "models/Martian Chess.glb" assets_file = "models/Martian Chess.glb"
skybox_file = "images/skybox.png" skybox_file = "images/skybox.png"
@ -71,6 +79,14 @@ pawn_blue = "DroneBlue"
dots_red = "Dots" dots_red = "Dots"
dots_blue = "DotsBlue" dots_blue = "DotsBlue"
[display3d.lights]
# https://docs.rs/bevy/0.11.3/bevy/pbr/struct.SpotLight.html
spot_light_scale = 1.0
# https://docs.rs/bevy/0.11.3/bevy/pbr/struct.PointLight.html
point_light_scale = 1.0
# https://docs.rs/bevy/0.11.3/bevy/pbr/struct.DirectionalLight.html
directional_light_scale = 1.0
### ###
# Fog # Fog
# Only seems to affect objects and not skyboxes # Only seems to affect objects and not skyboxes
@ -114,14 +130,6 @@ gamma = 1.0
pre_saturation = 1.0 pre_saturation = 1.0
post_saturation = 1.0 post_saturation = 1.0
###
# Screen Space Ambient Occlusion
# https://docs.rs/bevy/0.11.3/bevy/pbr/enum.ScreenSpaceAmbientOcclusionQualityLevel.html
# Requires: display3d.msaa = "Off"
###
[display3d.ssao]
# Options: Off, Low, Medium, High, Ultra
quality_level = "Off"
#################### ####################
# Display2d settings # Display2d settings

@ -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,
}
} }

Loading…
Cancel
Save