pub struct Settings {
pub defocus_mode: i32,
pub circle_of_confusion: Settings,
pub show_image: bool,
pub camera_max_size: f32,
pub use_camera_focal: bool,
pub use_direct_math: bool,
pub focal_plane_offset: f32,
pub size_multiplier: f32,
pub proxy_scale: Option<f32>,
pub gamma_correction: f32,
}Expand description
Settings that define the defocus calculation.
Fields§
§defocus_mode: i32Render 2d or use depth
circle_of_confusion: SettingsCircle of confusion settings
show_image: boolFlag indicating whether to show the image
camera_max_size: f32Maximum size for camera-based defocus
use_camera_focal: boolFlag indicating whether to use camera focal distance
use_direct_math: boolFlag indicating wheter to directly use the input depth
focal_plane_offset: f32Flag indicating whether to use camera focal distance
size_multiplier: f32Size multiplier for defocus
proxy_scale: Option<f32>Proxy scale factor
gamma_correction: f32Gamma correction to boost bokehs
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn defocus_mode(&self) -> DefocusMode
pub fn defocus_mode(&self) -> DefocusMode
Returns the enum value of defocus_mode, or the default if the field is set to an invalid enum value.
Sourcepub fn set_defocus_mode(&mut self, value: DefocusMode)
pub fn set_defocus_mode(&mut self, value: DefocusMode)
Sets defocus_mode to the provided enum value.
Sourcepub fn proxy_scale(&self) -> f32
pub fn proxy_scale(&self) -> f32
Returns the value of proxy_scale, or the default value if proxy_scale is unset.
Source§impl Settings
impl Settings
pub fn get_raw_max_size(&self) -> f32
Sourcepub fn get_max_size(&self) -> f32
pub fn get_max_size(&self) -> f32
Calculate the maximum defocus size based on the current mode.
Sourcepub fn get_current_max_size(&self) -> f32
pub fn get_current_max_size(&self) -> f32
Gets the current maximum size for defocus.
Sourcepub fn get_padding(&self) -> u32
pub fn get_padding(&self) -> u32
Calculate the padding required for rendering.
Trait Implementations§
Source§impl Message for Settings
impl Message for Settings
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.