From 5d935c26589c014e6dc2941481988abf50e51fdf Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 10 Jan 2025 03:11:29 +0100 Subject: fix triple inverted projection madness --- client/src/scene_render.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'client/src/scene_render.rs') diff --git a/client/src/scene_render.rs b/client/src/scene_render.rs index 6ec5f25..9dc14d1 100644 --- a/client/src/scene_render.rs +++ b/client/src/scene_render.rs @@ -127,8 +127,8 @@ impl ScenePipeline { ..Default::default() }, depth_stencil: Some(DepthStencilState { - depth_compare: CompareFunction::Greater, depth_write_enabled: true, + depth_compare: CompareFunction::Less, format: TextureFormat::Depth32Float, bias: DepthBiasState::default(), stencil: StencilState::default(), @@ -165,7 +165,7 @@ impl ScenePipeline { target: &TextureView, scene: &SceneTree, prefabs: &mut DemandMap, Arc>, - camera: Mat4, + projection: Mat4, ) { let mut rpass = commands.begin_render_pass(&RenderPassDescriptor { label: None, @@ -185,7 +185,7 @@ impl ScenePipeline { depth_stencil_attachment: Some(RenderPassDepthStencilAttachment { view: &self.depth, depth_ops: Some(Operations { - load: LoadOp::Clear(0.), + load: LoadOp::Clear(1.), store: StoreOp::Store, }), stencil_ops: None, @@ -194,7 +194,7 @@ impl ScenePipeline { }); for ob in scene.objects.values() { - let prefab_projection = camera + let prefab_projection = projection * Mat4::from_mat3(Mat3::from_euler( EulerRot::YXZ, ob.rot.x, -- cgit v1.2.3-70-g09d2