concinnity-device 0.19.53

GPU backends (Metal, Vulkan, DirectX) behind a device facade for Concinnity
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! The bloom chain's prefilter, downsample and upsample pipelines. Its mip
//! targets are built with the scene targets.

use concinnity_core::render::error::RenderResult;

use super::InitGpu;
use crate::metal::post::{BloomPipelines, build_bloom_pipelines};

// Built for any world with a 3D scene (only its uniforms vary at runtime).
// Without one there is nothing to threshold, and the graph never inserts the
// Bloom pass.
pub(super) fn build_bloom(gpu: &InitGpu<'_>, scene: bool) -> RenderResult<Option<BloomPipelines>> {
    Ok(if scene {
        Some(build_bloom_pipelines(&gpu.hw.device, gpu.hot_reload)?)
    } else {
        None
    })
}