use concinnity_core::gfx::render_types::{
CompositeParams, PostProcessParams, SsaoParams, SsgiParams, SsrParams,
};
use concinnity_render::uniforms::{AutoExposureParams, HizParams, TaaParams};
use crate::shader_layout::mirror::{Case, everywhere, mirror};
pub(in crate::shader_layout) fn taa() -> Vec<Case> {
vec![everywhere(
mirror!(TaaParams => "TaaParams" { history_valid, }),
)]
}
pub(in crate::shader_layout) fn bloom() -> Vec<Case> {
vec![everywhere(
mirror!(PostProcessParams => "PostProcessParams" {
bloom_intensity,
bloom_threshold,
bloom_knee,
exposure,
vignette,
lut_strength,
[hdr_output, pq_output, fxaa] => [],
}),
)]
}
pub(in crate::shader_layout) fn composite() -> Vec<Case> {
vec![everywhere(mirror!(CompositeParams => "CompositeParams" {
[post.bloom_intensity] => ["bloom_intensity"],
[post.bloom_threshold] => ["bloom_threshold"],
[post.bloom_knee] => ["bloom_knee"],
[post.exposure] => ["exposure"],
[post.vignette] => ["vignette"],
[post.lut_strength] => ["lut_strength"],
[post.hdr_output] => ["hdr_output"],
[post.pq_output] => ["pq_output"],
[post.fxaa] => ["fxaa"],
fade,
view_mode,
[far] => ["far_plane"],
}))]
}
pub(in crate::shader_layout) fn ssao() -> Vec<Case> {
vec![everywhere(mirror!(SsaoParams => "SsaoParams" {
radius,
intensity,
tan_half_fov_y,
aspect,
}))]
}
pub(in crate::shader_layout) fn ssr() -> Vec<Case> {
vec![everywhere(mirror!(SsrParams => "SsrParams" {
intensity,
max_distance,
tan_half_fov_y,
aspect,
stride,
thickness,
prefilter_mip_count,
_pad,
inv_view,
}))]
}
pub(in crate::shader_layout) fn ssgi() -> Vec<Case> {
vec![everywhere(mirror!(SsgiParams => "SsgiParams" {
intensity,
max_distance,
tan_half_fov_y,
aspect,
stride,
thickness,
rays,
steps,
}))]
}
pub(in crate::shader_layout) fn auto_exposure() -> Vec<Case> {
vec![everywhere(
mirror!(AutoExposureParams => "AutoExposureParams" {
lum_log2_min,
lum_log2_range,
lum_to_bin_scale,
_pad,
}),
)]
}
pub(in crate::shader_layout) fn hiz() -> Vec<Case> {
vec![everywhere(mirror!(HizParams => "HizParams" {
dst_width,
dst_height,
src_mip,
sample_count,
}))]
}