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

Function create_ssao_blur_rt

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

Create the SSAO bilateral-blur render target (same format/size as ssao_rt).

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

Source from the content-addressed store, hash-verified

678
679/// Create the SSAO bilateral-blur render target (same format/size as ssao_rt).
680pub(super) fn create_ssao_blur_rt(device: &wgpu::Device, width: u32, height: u32) -> (wgpu::Texture, wgpu::TextureView) {
681 let w = (width / 2).max(1);
682 let h = (height / 2).max(1);
683 let texture = device.create_texture(&wgpu::TextureDescriptor {
684 label: Some("ssao_blur_rt"),
685 size: wgpu::Extent3d { width: w, height: h, depth_or_array_layers: 1 },
686 mip_level_count: 1,
687 sample_count: 1,
688 dimension: wgpu::TextureDimension::D2,
689 format: SSAO_FORMAT,
690 usage: wgpu::TextureUsages::RENDER_ATTACHMENT
691 | wgpu::TextureUsages::TEXTURE_BINDING,
692 view_formats: &[],
693 });
694 let view = texture.create_view(&wgpu::TextureViewDescriptor::default());
695 (texture, view)
696}
697
698/// Build the linear-depth Hi-Z pyramid as `HIZ_MIP_COUNT` separate
699/// single-mip textures. One multi-mip texture is cheaper on paper

Callers 2

newMethod · 0.85
resizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected