Skip to content

Commit

Permalink
Update wgpu in custom_shader example
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Nov 14, 2023
1 parent 46a48af commit 3e8ed05
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
15 changes: 10 additions & 5 deletions examples/custom_shader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ authors = ["Bingus <shankern@protonmail.com>"]
edition = "2021"

[dependencies]
iced = { path = "../..", features = ["debug", "advanced"]}
image = { version = "0.24.6"}
wgpu = "0.17"
bytemuck = { version = "1.13.1" }
glam = { version = "0.24.0", features = ["bytemuck"] }
iced.workspace = true
iced.features = ["debug", "advanced"]

image.workspace = true
wgpu.workspace = true
bytemuck.workspace = true

glam.workspace = true
glam.features = ["bytemuck"]

rand = "0.8.5"
10 changes: 7 additions & 3 deletions examples/custom_shader/src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ impl Pipeline {
resolve_target: None,
ops: wgpu::Operations {
load: wgpu::LoadOp::Load,
store: true,
store: wgpu::StoreOp::Store,
},
},
)],
Expand All @@ -364,11 +364,13 @@ impl Pipeline {
view: &self.depth_view,
depth_ops: Some(wgpu::Operations {
load: wgpu::LoadOp::Clear(1.0),
store: true,
store: wgpu::StoreOp::Store,
}),
stencil_ops: None,
},
),
timestamp_writes: None,
occlusion_query_set: None,
});

pass.set_scissor_rect(
Expand Down Expand Up @@ -547,7 +549,7 @@ impl DepthPipeline {
resolve_target: None,
ops: wgpu::Operations {
load: wgpu::LoadOp::Load,
store: true,
store: wgpu::StoreOp::Store,
},
})],
depth_stencil_attachment: Some(
Expand All @@ -557,6 +559,8 @@ impl DepthPipeline {
stencil_ops: None,
},
),
timestamp_writes: None,
occlusion_query_set: None,
});

pass.set_scissor_rect(bounds.x, bounds.y, bounds.width, bounds.height);
Expand Down

0 comments on commit 3e8ed05

Please sign in to comment.