Compare commits

..

5 Commits

4 changed files with 6 additions and 6 deletions

2
Cargo.lock generated
View File

@@ -4033,7 +4033,7 @@ dependencies = [
[[package]]
name = "strafesnet_graphics"
version = "0.0.11"
version = "0.0.11-depth2"
dependencies = [
"bytemuck",
"ddsfile",

View File

@@ -1,6 +1,6 @@
[package]
name = "strafesnet_graphics"
version = "0.0.11"
version = "0.0.11-depth2"
edition = "2024"
[dependencies]

View File

@@ -134,7 +134,7 @@ pub struct GraphicsState{
}
impl GraphicsState{
const DEPTH_FORMAT:wgpu::TextureFormat=wgpu::TextureFormat::Depth24Plus;
const DEPTH_FORMAT:wgpu::TextureFormat=wgpu::TextureFormat::Depth32Float;
fn create_depth_texture(
size:glam::UVec2,
device:&wgpu::Device,
@@ -149,7 +149,7 @@ impl GraphicsState{
sample_count:1,
dimension:wgpu::TextureDimension::D2,
format:Self::DEPTH_FORMAT,
usage:wgpu::TextureUsages::RENDER_ATTACHMENT,
usage:wgpu::TextureUsages::RENDER_ATTACHMENT|wgpu::TextureUsages::COPY_SRC,
label:Some("Depth Texture"),
view_formats:&[],
})
@@ -976,7 +976,7 @@ impl GraphicsState{
view:&self.depth_view,
depth_ops:Some(wgpu::Operations{
load:wgpu::LoadOp::Clear(1.0),
store:wgpu::StoreOp::Discard,
store:wgpu::StoreOp::Store,
}),
stencil_ops:None,
}),

View File

@@ -1334,7 +1334,7 @@ fn set_velocity_cull(body:&mut Body,touching:&mut TouchingState,models:&PhysicsM
let mut culled=false;
touching.contacts.retain(|convex_mesh_id,face_id|{
let n=contact_normal(models,hitbox_mesh,convex_mesh_id,*face_id);
let r=(n.dot(v)>>52).is_positive();
let r=n.dot(v).is_positive();
if r{
culled=true;
}