Struct three_d::renderer::effect::FxaaEffect
source · pub struct FxaaEffect {}Expand description
A simple anti-aliasing approach which smooths otherwise jagged edges (for example lines) but also smooths the rest of the image.
Implementations§
source§impl FxaaEffect
impl FxaaEffect
sourcepub fn apply(&self, context: &Context, color_texture: ColorTexture<'_>)
👎Deprecated: use apply_screen_effect instead
pub fn apply(&self, context: &Context, color_texture: ColorTexture<'_>)
apply_screen_effect insteadApplies the FXAA effect to the given color texture. Must be called in the callback given as input to a RenderTarget, ColorTarget or DepthTarget write method.
Trait Implementations§
source§impl Clone for FxaaEffect
impl Clone for FxaaEffect
source§fn clone(&self) -> FxaaEffect
fn clone(&self) -> FxaaEffect
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for FxaaEffect
impl Debug for FxaaEffect
source§impl Default for FxaaEffect
impl Default for FxaaEffect
source§fn default() -> FxaaEffect
fn default() -> FxaaEffect
Returns the “default value” for a type. Read more
source§impl Effect for FxaaEffect
impl Effect for FxaaEffect
source§fn fragment_shader_source(
&self,
_lights: &[&dyn Light],
color_texture: Option<ColorTexture<'_>>,
_depth_texture: Option<DepthTexture<'_>>
) -> String
fn fragment_shader_source( &self, _lights: &[&dyn Light], color_texture: Option<ColorTexture<'_>>, _depth_texture: Option<DepthTexture<'_>> ) -> String
Returns the fragment shader source for this effect.
source§fn id(
&self,
color_texture: Option<ColorTexture<'_>>,
_depth_texture: Option<DepthTexture<'_>>
) -> u16
fn id( &self, color_texture: Option<ColorTexture<'_>>, _depth_texture: Option<DepthTexture<'_>> ) -> u16
Returns a unique ID for each variation of the shader source returned from Effect::fragment_shader_source. Read more
source§fn fragment_attributes(&self) -> FragmentAttributes
fn fragment_attributes(&self) -> FragmentAttributes
Returns a FragmentAttributes struct that describes which fragment attributes,
ie. the input from the vertex shader, are required for rendering with this effect.
source§fn use_uniforms(
&self,
program: &Program,
_camera: &Camera,
_lights: &[&dyn Light],
color_texture: Option<ColorTexture<'_>>,
_depth_texture: Option<DepthTexture<'_>>
)
fn use_uniforms( &self, program: &Program, _camera: &Camera, _lights: &[&dyn Light], color_texture: Option<ColorTexture<'_>>, _depth_texture: Option<DepthTexture<'_>> )
Sends the uniform data needed for this effect to the fragment shader.
source§fn render_states(&self) -> RenderStates
fn render_states(&self) -> RenderStates
Returns the render states needed to render with this effect.
Auto Trait Implementations§
impl RefUnwindSafe for FxaaEffect
impl Send for FxaaEffect
impl Sync for FxaaEffect
impl Unpin for FxaaEffect
impl UnwindSafe for FxaaEffect
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