Skip to main content

ConvolveSettings

Struct ConvolveSettings 

Source
#[repr(C, align(16))]
pub struct ConvolveSettings {
Show 31 fields pub process_region: IVec4, pub full_region: IVec4, pub resolution: UVec2, pub filter_resolution: UVec2, pub center: Vec2, pub flags: u32, pub non_uniform_flags: u32, pub samples: u32, pub pixel_aspect: f32, pub size: f32, pub max_size: f32, pub catseye_amount: f32, pub catseye_gamma: f32, pub catseye_softness: f32, pub astigmatism_amount: f32, pub astigmatism_gamma: f32, pub barndoors_amount: f32, pub barndoors_gamma: f32, pub barndoors_top: f32, pub barndoors_bottom: f32, pub barndoors_left: f32, pub barndoors_right: f32, pub filter_aspect_ratio_normalizer: f32, pub image_elements: u32, pub ring_distance: f32, pub filter_aspect_ratio: f32, pub pixel_aspect_normalizer: f32, pub render_scale: u32, pub axial_aberration_amount: f32, pub axial_aberration_type: i32, pub _padding: u32,
}
Expand description

Settings structure for convolution operations.

Fields§

§process_region: IVec4

Region to process (x, y, width, height)

§full_region: IVec4

Full region (x, y, width, height)

§resolution: UVec2

Resolution of the render (width, height)

§filter_resolution: UVec2

Resolution of the filter (width, height)

§center: Vec2

Center point of the convolution

§flags: u32

Global operation flags

§non_uniform_flags: u32

Flags for non uniform settings

§samples: u32

Number of samples to use for convolution

§pixel_aspect: f32

Pixel aspect ratio

§size: f32

Base size for convolution

§max_size: f32

Maximum size for convolution

§catseye_amount: f32

Amount of catseye effect

§catseye_gamma: f32

Gamma correction for catseye

§catseye_softness: f32

Softness of catseye edges

§astigmatism_amount: f32

Amount of astigmatism

§astigmatism_gamma: f32

Gamma correction for astigmatism

§barndoors_amount: f32

Amount of barndoors effect

§barndoors_gamma: f32

Gamma correction for barndoors

§barndoors_top: f32

Top position of barndoors

§barndoors_bottom: f32

Bottom position of barndoors

§barndoors_left: f32

Left position of barndoors

§barndoors_right: f32

Right position of barndoors

§filter_aspect_ratio_normalizer: f32

Normalization factor for filter aspect ratio

§image_elements: u32

Total number of

§ring_distance: f32

Distance between rings in the filter

§filter_aspect_ratio: f32

Aspect ratio of the filter

§pixel_aspect_normalizer: f32

Normalization factor for pixel aspect

§render_scale: u32

Size of render

§axial_aberration_amount: f32

Flag indicating whether to invert foreground bokeh shape

§axial_aberration_type: i32§_padding: u32

Implementations§

Source§

impl ConvolveSettings

Source

pub fn compute_sample_weight(&self, coc: f32) -> f32

Source

pub fn get_sample_weights(&self) -> [f32; 2048]

Source

pub fn get_image_resolution(&self) -> UVec2

Source

pub fn get_real_coordinates(&self, coordinates: UVec2) -> UVec2

Get the coordinates in screen-space based on the full region

Source

pub fn get_axial_aberration_settings(&self) -> AxialAberration

Trait Implementations§

Source§

impl Clone for ConvolveSettings

Source§

fn clone(&self) -> ConvolveSettings

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ConvolveSettings

Source§

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

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

impl Zeroable for ConvolveSettings

Source§

fn zeroed() -> Self

Source§

impl Copy for ConvolveSettings

Source§

impl Pod for ConvolveSettings

Auto Trait Implementations§

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> CheckedBitPattern for T
where T: AnyBitPattern,

Source§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
Source§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
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, 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> AnyBitPattern for T
where T: Pod,

Source§

impl<T> NoUninit for T
where T: Pod,