Skip to main content

Filter

Enum Filter 

Source
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

Source

pub const ALL: [Self; 3]

Every shadow filter, from cheapest to highest quality.

Source

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.

Source

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.

Source

pub fn from_name(name: &str) -> Option<Self>

The filter name names, or None for a name outside the set.

Trait Implementations§

Source§

impl Clone for Filter

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Filter

Source§

impl Debug for Filter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Filter

Source§

impl PartialEq for Filter

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Filter

Auto Trait Implementations§

§

impl Forget for Filter

§

impl Freeze for Filter

§

impl Move for Filter

§

impl RefUnwindSafe for Filter

§

impl Send for Filter

§

impl Sync for Filter

§

impl Unpin for Filter

§

impl UnsafeUnpin for Filter

§

impl UnwindSafe for Filter

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HalThreadSafe for T
where T: Send + Sync,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.