Compare commits

..

1 Commits

Author SHA1 Message Date
ab98633c51 bodge surf 2026-03-27 11:34:30 -07:00
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-depth2"
version = "0.0.11"
dependencies = [
"bytemuck",
"ddsfile",

View File

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

View File

@@ -134,7 +134,7 @@ pub struct GraphicsState{
}
impl GraphicsState{
const DEPTH_FORMAT:wgpu::TextureFormat=wgpu::TextureFormat::Depth32Float;
const DEPTH_FORMAT:wgpu::TextureFormat=wgpu::TextureFormat::Depth24Plus;
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|wgpu::TextureUsages::COPY_SRC,
usage:wgpu::TextureUsages::RENDER_ATTACHMENT,
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::Store,
store:wgpu::StoreOp::Discard,
}),
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).is_positive();
let r=(n.dot(v)>>52).is_positive();
if r{
culled=true;
}