Enum glium::draw_parameters::BlendingFunction
[−]
[src]
pub enum BlendingFunction {
AlwaysReplace,
Min,
Max,
Addition {
source: LinearBlendingFactor,
destination: LinearBlendingFactor,
},
Subtraction {
source: LinearBlendingFactor,
destination: LinearBlendingFactor,
},
ReverseSubtraction {
source: LinearBlendingFactor,
destination: LinearBlendingFactor,
},
}Function that the GPU will use for blending.
Variants
AlwaysReplaceSimply overwrite the destination pixel with the source pixel.
The alpha channels are simply ignored. This is the default mode.
For example writing (0.5, 0.9, 0.4, 0.2) over (0.9, 0.1, 0.4, 0.3) will
result in (0.5, 0.9, 0.4, 0.2).
MinFor each individual component (red, green, blue, and alpha), the minimum value is chosen between the source and the destination.
For example writing (0.5, 0.9, 0.4, 0.2) over (0.9, 0.1, 0.4, 0.3) will
result in (0.5, 0.1, 0.4, 0.2).
MaxFor each individual component (red, green, blue, and alpha), the maximum value is chosen between the source and the destination.
For example writing (0.5, 0.9, 0.4, 0.2) over (0.9, 0.1, 0.4, 0.3) will
result in (0.9, 0.9, 0.4, 0.3).
AdditionFor each individual component (red, green, blue, and alpha), a weighted addition between the source and the destination.
The result is equal to source_component * source_factor + dest_component * dest_factor,
where source_factor and dest_factor are the values of source and destination of
this enum.
Fields
source: LinearBlendingFactor | The factor to apply to the source pixel. |
destination: LinearBlendingFactor | The factor to apply to the destination pixel. |
SubtractionFor each individual component (red, green, blue, and alpha), a weighted substraction of the source by the destination.
The result is equal to source_component * source_factor - dest_component * dest_factor,
where source_factor and dest_factor are the values of source and destination of
this enum.
Fields
source: LinearBlendingFactor | The factor to apply to the source pixel. |
destination: LinearBlendingFactor | The factor to apply to the destination pixel. |
ReverseSubtractionFor each individual component (red, green, blue, and alpha), a weighted substraction of the destination by the source.
The result is equal to -source_component * source_factor + dest_component * dest_factor,
where source_factor and dest_factor are the values of source and destination of
this enum.
Fields
source: LinearBlendingFactor | The factor to apply to the source pixel. |
destination: LinearBlendingFactor | The factor to apply to the destination pixel. |
Trait Implementations
impl Eq for BlendingFunction[src]
impl PartialEq for BlendingFunction[src]
fn eq(&self, __arg_0: &BlendingFunction) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &BlendingFunction) -> bool
This method tests for !=.
impl Debug for BlendingFunction[src]
impl Copy for BlendingFunction[src]
impl Clone for BlendingFunction[src]
fn clone(&self) -> BlendingFunction
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more