Struct three_d::renderer::effect::CopyEffect
source · pub struct CopyEffect {
pub write_mask: WriteMask,
pub blend: Blend,
}
Expand description
Copies the content of the color and/or depth texture by rendering a quad with those textures applied. The difference from ScreenEffect is that this effect does not apply any mapping set in the Camera.
Fields§
§write_mask: WriteMask
Defines which channels (red, green, blue, alpha and depth) to copy.
blend: Blend
Defines which type of blending to use when writing the copied color to the render target.
Trait Implementations§
source§impl Clone for CopyEffect
impl Clone for CopyEffect
source§fn clone(&self) -> CopyEffect
fn clone(&self) -> CopyEffect
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 CopyEffect
impl Debug for CopyEffect
source§impl Default for CopyEffect
impl Default for CopyEffect
source§fn default() -> CopyEffect
fn default() -> CopyEffect
Returns the “default value” for a type. Read more
source§impl Effect for CopyEffect
impl Effect for CopyEffect
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 CopyEffect
impl Send for CopyEffect
impl Sync for CopyEffect
impl Unpin for CopyEffect
impl UnwindSafe for CopyEffect
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