mirror of
https://github.com/sotrh/learn-wgpu.git
synced 2024-11-16 06:12:55 +00:00
commit
38adad1421
@ -369,7 +369,7 @@ wgpu::RenderPassColorAttachmentDescriptor {
|
||||
|
||||
The `RenderPassColorAttachmentDescriptor` has the `attachment` field which informs `wgpu` what texture to save the colors to. In this case we specify `frame.view` that we created using `swap_chain.get_current_frame()`. This means that any colors we draw to this attachment will get drawn to the screen.
|
||||
|
||||
This is the texture that will receive the resolved output. This will be the same as `attachment` unless multisampling is enabled. We don't need to specify this, so we leave it as `None`.
|
||||
The `resolve_target` is the texture that will receive the resolved output. This will be the same as `attachment` unless multisampling is enabled. We don't need to specify this, so we leave it as `None`.
|
||||
|
||||
The `ops` field takes a `wpgu::Operations` object. This tells wgpu what to do with the colors on the screen (specified by `frame.view`). The `load` field tells wgpu how to handle colors stored from the previous frame. Currently we are clearing the screen with a bluish color.
|
||||
|
||||
|
@ -193,11 +193,11 @@ let diffuse_bind_group = device.create_bind_group(
|
||||
entries: &[
|
||||
wgpu::BindGroupEntry {
|
||||
binding: 0,
|
||||
resource: wgpu::BindingResource::TextureView(&diffuse_texture.view),
|
||||
resource: wgpu::BindingResource::TextureView(&diffuse_texture_view),
|
||||
},
|
||||
wgpu::BindGroupEntry {
|
||||
binding: 1,
|
||||
resource: wgpu::BindingResource::Sampler(&diffuse_texture.sampler),
|
||||
resource: wgpu::BindingResource::Sampler(&diffuse_sampler),
|
||||
}
|
||||
],
|
||||
label: Some("diffuse_bind_group"),
|
||||
|
Loading…
Reference in New Issue
Block a user