The dissolve texture is fixed!

Somehow there are _more_ bugs now, but a big one is fixed!
main
Elijah C. Voigt 2 years ago
parent e4e993ed64
commit 72811d6d04

@ -157,7 +157,7 @@ invalid = "/sfx/3D/3DInvalidMove"
# Options: Off, Sample2, Sample4, Sample8
# Requires: display3d.ssoa.quality_level = "Off"
###
msaa = "Sample4"
msaa = "Sample8"
###
# Enable HDR lighting
@ -172,6 +172,12 @@ hdr = true
###
ssoa.quality_level = "Off"
[display3d.skybox]
brightness = 100.0
[display3d.environment_map_light]
intensity = 1.0
[display3d.models]
assets_file = "models/Martian Chess.glb"
skybox_file = "images/skybox.png"
@ -216,30 +222,22 @@ drone_red = "DroneRedPieceIdle"
queen_blue = "QueenBluePieceIdle"
queen_red = "QueenRedPieceIdle"
[display3d.lights.scaling]
# https://docs.rs/bevy/0.11.3/bevy/pbr/struct.SpotLight.html
spot = 1.0
# https://docs.rs/bevy/0.11.3/bevy/pbr/struct.PointLight.html
point = 0.01
# https://docs.rs/bevy/0.11.3/bevy/pbr/struct.DirectionalLight.html
directional = 1.0
###
# Fog
# Only seems to affect objects and not skyboxes
###
[display3d.fog]
directional_light_exponent = 0.0
directional_light_exponent = 1.0
[display3d.fog.color]
Rgba = { red = 1.0, green = 1.0, blue = 1.0, alpha = 0.0 }
Rgba = { red = 0.0, green = 0.0, blue = 0.0, alpha = 1.0 }
[display3d.fog.directional_light_color]
Rgba = { red = 1.0, green = 1.0, blue = 1.0, alpha = 0.0 }
Rgba = { red = 0.0, green = 0.0, blue = 0.0, alpha = 1.0 }
###
# Fog Faloff
# https://docs.rs/bevy/0.11.3/bevy/pbr/enum.FogFalloff.html
###
[display3d.fog.falloff]
Exponential = { density = 1.0 }
Atmospheric = { extinction = [0.0, 0.0, 0.0], inscattering = [0.0, 0.0, 0.0] }
# Examples:
# * Linear = { start = 1.0, end = 10.0 }
# * Exponential = { density = 1.0 }
@ -255,17 +253,17 @@ Exponential = { density = 1.0 }
# https://docs.rs/bevy/0.11.3/bevy/core_pipeline/tonemapping/enum.Tonemapping.html
# Options: None, Reinhard, ReinhardLuminance, AcesFitted, AgX, SomewhatBoringDisplayTransform, TonyMcMapface, BlenderFilmic
###
tonemapping = "ReinhardLuminance"
tonemapping = "BlenderFilmic"
###
# Color grading
# https://docs.rs/bevy/0.11.3/bevy/render/view/struct.ColorGrading.html
###
[display3d.color.grading]
exposure = 2.0
exposure = 1.0
gamma = 1.0
pre_saturation = 1.0
post_saturation = 1.0
[display3d.bloom]
intensity = 0.15
intensity = 0.0

@ -220,6 +220,9 @@ fn hydrate_camera(
let skybox_handle = tweak
.get_handle::<Image>("display3d_models_skybox_file")
.unwrap();
let skybox_brightness = tweak.get::<f32>("display3d_skybox_brightness").unwrap();
let environment_map_intensity = tweak.get::<f32>("display3d_environment_map_light_intensity").unwrap();
let fog_settings = tweak.get::<tweaks::TweakFogSettings>("display3d_fog").unwrap().into();
info!("Hydrating camera {:?}", entity);
// Populate the components for the camera
commands.entity(entity).insert((
@ -238,18 +241,17 @@ fn hydrate_camera(
BloomSettings { ..default() },
Skybox {
image: skybox_handle.clone(),
brightness: 150.0,
brightness: skybox_brightness,
},
EnvironmentMapLight {
diffuse_map: skybox_handle.clone(),
specular_map: skybox_handle.clone(),
intensity: 1.0,
intensity: environment_map_intensity,
},
FogSettings { ..default() },
FogSettings { ..fog_settings },
ScreenSpaceAmbientOcclusionBundle { ..default() },
TemporalAntiAliasSettings { ..default() },
MotionVectorPrepass,
// Name::new("3D Camera"),
));
let assets_handle = tweak
@ -290,6 +292,8 @@ fn update_tweaks(
&mut ColorGrading,
&mut Tonemapping,
&mut BloomSettings,
&mut Skybox,
&mut EnvironmentMapLight,
),
With<Display3d>,
>,
@ -300,7 +304,7 @@ fn update_tweaks(
if let Some(tweak) = tweaks.get(tweaks_file.handle.clone()) {
warn!("Updating tweaks!");
camera_settings.iter_mut().for_each(
|(entity, mut fog, mut color_grading, mut tonemapping, mut bloom)| {
|(entity, mut fog, mut color_grading, mut tonemapping, mut bloom, mut skybox, mut environment_map_light)| {
*fog = tweak
.get::<tweaks::TweakFogSettings>("display3d_fog")
.unwrap()
@ -317,6 +321,12 @@ fn update_tweaks(
.get::<tweaks::TweakBloomSettings>("display3d_bloom")
.unwrap()
.into();
skybox.brightness = tweak
.get::<f32>("display3d_skybox_brightness")
.unwrap();
environment_map_light.intensity = tweak
.get::<f32>("display3d_environment_map_light_intensity")
.unwrap();
let quality_level = tweak
.get::<tweaks::TweakScreenSpaceAmbientOcclusionQualityLevel>(
@ -1124,11 +1134,15 @@ fn setup_capture_piece(
// Extension we will add to existing gltf-sourced materials
let extension = DissolveExtension { percentage: 1.0 };
// Base material we will extend for the duration of the dissolve effect
let base = standard_materials
let mut base: StandardMaterial = standard_materials
.get(std_handle)
.expect("Resolve material data")
.clone();
base.alpha_mode = AlphaMode::Mask(0.5);
base.base_color = Color::NONE.with_a(0.0);
info!("Base material {:#?}", base);
dissolve_materials.add(ExtendedMaterial { base, extension })
}
Some(dis_handle) => dis_handle.clone(),

Loading…
Cancel
Save