Compare commits
5 Commits
master
...
graphics-b
| Author | SHA1 | Date | |
|---|---|---|---|
|
8c66b0bd72
|
|||
|
7c16b41717
|
|||
|
69f182bca1
|
|||
|
9c30fa04a5
|
|||
|
ad4de709da
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -4033,7 +4033,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "strafesnet_graphics"
|
||||
version = "0.0.11"
|
||||
version = "0.0.11-depth2"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"ddsfile",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "strafesnet_graphics"
|
||||
version = "0.0.11"
|
||||
version = "0.0.11-depth2"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -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,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user