pub enum Filter {
Pcss,
Disc,
Box,
}Expand description
The shadow filter a fragment runs — topic 45’s ladder, with every rung of it still in the tree.
A uniform lane and not a pipeline, which is what separates this from
crate::ssao’s Technique: the occlusion gather is a full-screen pass and
two of them are two shaders, where this is a branch inside a scene draw.
crate::split’s header is where the consequence is argued — a scene pass
cannot record itself twice under a scissor without drawing every triangle
twice, so the seam rides in the frame block and mesh.slang’s
shadow_filter_mode picks a side per fragment.
Variants§
Pcss
The blocker search sizes the sun’s disc per fragment and the punctual maps take it at its fixed reach: the ninth, tenth and eleventh decisions together. What ships, and what every golden was blessed under.
Disc
The same rotated disc at the fixed reach for the sun as well, so no blocker search runs and no penumbra widens with its caster’s height: the ninth and eleventh decisions without the tenth.
Box
The 3×3 hardware-PCF box the ninth decision replaced.
Implementations§
Source§impl Filter
impl Filter
Sourcepub const fn label(self) -> &'static str
pub const fn label(self) -> &'static str
The name r_shadow_filter holds for this one.
The convar! needs literals, so the names are written twice — three
times counting mesh.slang’s constants — and this module’s
the_variable_names_are_the_filters_labels is what holds this copy to
the other two.
Sourcepub fn mode(self) -> u32
pub fn mode(self) -> u32
The value mesh.slang compares against, which is this filter’s place in
crcbl_shaders::mesh::SHADOW_FILTERS.
Derived from the list rather than written down, so a filter inserted in the middle of it renumbers here rather than silently selecting its neighbour.