Compare commits

...

5 Commits

3 changed files with 5 additions and 5 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,
}),