Vocabularygpu.stateClass descriptionA
blend-mode is specified as part of the
blend-state to determine the blending equation used between the source (incoming fragment) and destination (existing framebuffer value) colors of blended pixels.
• | The equation slot determines how the source and destination colors are combined after the source-function and dest-function have been applied.
• | eq-add indicates that the source and destination results are added. | • | eq-subtract indicates that the destination result is subtracted from the source. | • | eq-reverse-subtract indicates that the source result is subtracted from the destination. | • | eq-min indicates that the componentwise minimum of the source and destination results is taken. | • | eq-max indicates that the componentwise maximum of the source and destination results is taken. |
|
• | The source-function and dest-function slots each specify a function to apply to the source, destination, or constant color values to generate a blending factor that is multiplied respectively against the source or destination value before feeding the results to the equation. |
• | |
• | A typical transparency effect will use the values: |
• | T{ blend-mode
{ equation eq-add }
{ source-function func-source-alpha }
{ dest-function func-one-minus-source-alpha }
} |
See also<blend-mode>Definition