pub struct SharpeningPass {
pub enabled: bool,
pub config: CasConfig,
pub shader_handle: u64,
pub time_us: u64,
}Expand description
Sharpening pass using Contrast Adaptive Sharpening.
Fields§
§enabled: boolWhether the pass is enabled.
config: CasConfigConfiguration.
shader_handle: u64Shader program handle.
time_us: u64Time taken (microseconds).
Implementations§
Source§impl SharpeningPass
impl SharpeningPass
pub fn new() -> Self
pub fn with_sharpness(self, sharpness: f32) -> Self
Sourcepub fn sharpen_pixel<F>(&self, x: u32, y: u32, sample: F) -> [f32; 3]
pub fn sharpen_pixel<F>(&self, x: u32, y: u32, sample: F) -> [f32; 3]
Apply CAS to a single pixel (CPU reference implementation).
Sourcepub fn fragment_shader(&self) -> String
pub fn fragment_shader(&self) -> String
Generate the CAS fragment shader.
Trait Implementations§
Source§impl Debug for SharpeningPass
impl Debug for SharpeningPass
Auto Trait Implementations§
impl Freeze for SharpeningPass
impl RefUnwindSafe for SharpeningPass
impl Send for SharpeningPass
impl Sync for SharpeningPass
impl Unpin for SharpeningPass
impl UnsafeUnpin for SharpeningPass
impl UnwindSafe for SharpeningPass
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.