MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / create_taa_textures

Function create_taa_textures

native/shared/src/renderer/formats.rs:604–623  ·  view source on GitHub ↗

Create the two TAA history textures (HDR format, surface size).

(device: &wgpu::Device, width: u32, height: u32)

Source from the content-addressed store, hash-verified

602
603/// Create the two TAA history textures (HDR format, surface size).
604pub(super) fn create_taa_textures(device: &wgpu::Device, width: u32, height: u32) -> ([wgpu::Texture; 2], [wgpu::TextureView; 2]) {
605 let make = |label: &str| -> (wgpu::Texture, wgpu::TextureView) {
606 let texture = device.create_texture(&wgpu::TextureDescriptor {
607 label: Some(label),
608 size: wgpu::Extent3d { width, height, depth_or_array_layers: 1 },
609 mip_level_count: 1,
610 sample_count: 1,
611 dimension: wgpu::TextureDimension::D2,
612 format: HDR_FORMAT,
613 usage: wgpu::TextureUsages::RENDER_ATTACHMENT
614 | wgpu::TextureUsages::TEXTURE_BINDING,
615 view_formats: &[],
616 });
617 let view = texture.create_view(&wgpu::TextureViewDescriptor::default());
618 (texture, view)
619 };
620 let (a, av) = make("taa_a");
621 let (b, bv) = make("taa_b");
622 ([a, b], [av, bv])
623}
624
625/// Create the SSAO render target. Written by the compute GTAO pass
626/// (via `STORAGE_BINDING`) and sampled by the bilateral blur +

Callers 2

newMethod · 0.85
resizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected