Skip to content

Commit

Permalink
cleanup demo + fix assets_gui lighting
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriopass committed Dec 18, 2023
1 parent 1d000cb commit 876876d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion assets_gui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use egui::FontFamily::{Monospace, Proportional};
use egui::FontId;

use engine::meshload::load_mesh_with_properties;
use engine::{Context, FrameContext, GfxContext, SpriteBatchBuilder};
use engine::{Context, FrameContext, GfxContext, GfxSettings, SpriteBatchBuilder};
use geom::{vec3, InfiniteFrustrum, LinearColor, Plane, Vec2, Vec3};

use crate::gui::{Gui, Inspected, Shown};
Expand Down Expand Up @@ -79,6 +79,8 @@ impl engine::framework::State for State {
)
.try_into()
.unwrap();

gfx.update_settings(GfxSettings::default());
}

fn render(&mut self, fc: &mut FrameContext) {
Expand Down
8 changes: 2 additions & 6 deletions engine_demo/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use common::{AudioKind, History};
use engine::meshload::load_mesh;
use engine::{
Context, FrameContext, GfxContext, GfxSettings, InstancedMeshBuilder, KeyCode, MeshInstance,
MouseButton, ShadowQuality,
Context, FrameContext, GfxSettings, InstancedMeshBuilder, KeyCode, MeshInstance, MouseButton,
ShadowQuality,
};
use geom::{
vec3, Camera, Degrees, InfiniteFrustrum, LinearColor, Matrix4, Plane, Radians, Vec2, Vec3,
Expand Down Expand Up @@ -51,10 +51,6 @@ impl engine::framework::State for State {
fn new(ctx: &mut Context) -> Self {
let gfx = &mut ctx.gfx;

gfx.render_params.value_mut().shadow_mapping_resolution = 2048;
gfx.sun_shadowmap = GfxContext::mk_shadowmap(&gfx.device, 2048);
gfx.update_simplelit_bg();

let mut meshes = vec![];

if let Ok(m) = load_mesh(gfx, "DamagedHelmet.glb") {
Expand Down

0 comments on commit 876876d

Please sign in to comment.