pub struct ScreenEffect {
pub write_mask: WriteMask,
pub blend: Blend,
}Expand description
Renders a full screen quad with the content of the color and/or depth textures. The difference from CopyEffect is that this effect also applies any tone and color mapping specified in the Viewer.
Fields§
§write_mask: WriteMaskDefines which channels (red, green, blue, alpha and depth) to render into.
blend: BlendDefines which type of blending to use when writing the color to the render target.
Trait Implementations§
Source§impl Clone for ScreenEffect
impl Clone for ScreenEffect
Source§fn clone(&self) -> ScreenEffect
fn clone(&self) -> ScreenEffect
Returns a duplicate 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 ScreenEffect
impl Debug for ScreenEffect
Source§impl Default for ScreenEffect
impl Default for ScreenEffect
Source§fn default() -> ScreenEffect
fn default() -> ScreenEffect
Returns the “default value” for a type. Read more
Source§impl Effect for ScreenEffect
impl Effect for ScreenEffect
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<'_>>,
) -> EffectMaterialId
fn id( &self, color_texture: Option<ColorTexture<'_>>, depth_texture: Option<DepthTexture<'_>>, ) -> EffectMaterialId
Returns a unique ID for each variation of the shader source returned from Effect::fragment_shader_source. Read more
Source§fn use_uniforms(
&self,
program: &Program,
viewer: &dyn Viewer,
_lights: &[&dyn Light],
color_texture: Option<ColorTexture<'_>>,
depth_texture: Option<DepthTexture<'_>>,
)
fn use_uniforms( &self, program: &Program, viewer: &dyn Viewer, _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 Freeze for ScreenEffect
impl RefUnwindSafe for ScreenEffect
impl Send for ScreenEffect
impl Sync for ScreenEffect
impl Unpin for ScreenEffect
impl UnwindSafe for ScreenEffect
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