Difference between revisions of "EffectShader"

904 bytes added ,  22:15, 17 August 2013
imported>Danielleonyett
imported>Danielleonyett
Line 19: Line 19:


''Zero''
''Zero''
:: Uses 0 as its pixel value
:: Uses 0 as its pixel value. (All channels of the color are multiplied by zero)


''One''
''One''
:: Uses 1 as its pixel value
:: Uses 1 as its pixel value. (Multiplies each component by one)


''Source Alpha''
''Source Alpha''
:: RGB components of source pixel multiplied by alpha
:: RGB components of source pixel multiplied by alpha (Multiplies all channels with the source alpha)


''Source Inverted Alpha''
''Source Inverted Alpha''
:: RGB components of source pixel multiplied by 1 - alpha
:: RGB components of source pixel multiplied by 1 - alpha (Multiplies all channels with one minus the source alpha)


''Source Color''
''Source Color''
:: Color of source pixel
:: Color of source pixel (Multiplies each component with the respective component in the source color)


''Source Inverse Color''
''Source Inverse Color''
:: Color of source pixel subtracted per component from white
:: Color of source pixel subtracted per component from white (Multiplies each component with one minus the respective component in the source color)


''Dest Alpha''
''Dest Alpha''
:: RGB components of destination pixel multiplied by alpha
:: RGB components of destination pixel multiplied by alpha (Multiplies all channels with the destination alpha)


''Dest Inverted Alpha''
''Dest Inverted Alpha''
:: RGB components of destination pixel multiplied by 1 - alpha
:: RGB components of destination pixel multiplied by 1 - alpha (Multiplies all channels with one minus the destination alpha)


''Dest Color''
''Dest Color''
:: Color of destination pixel
:: Color of destination pixel (Multiplies each component with the respective component in the destination color)


''Dest Inverse Color''
''Dest Inverse Color''
:: Color of destination pixel subtracted per component from white
:: Color of destination pixel subtracted per component from white (Multiplies each component with one minus the respective component in the destination color)


''Source Alpha SAT''
''Source Alpha SAT''
:: Takes the lesser of the source pixel's alpha or one minus the destination pixel's alpha and places it in the red, green, and blue fields of the specified pixel. This mode sets the specified pixel's alpha to be 1.
:: Takes the lesser of the source pixel's alpha or one minus the destination pixel's alpha and places it in the red, green, and blue fields of the specified pixel. This mode sets the specified pixel's alpha to be 1. (The red, green and blue channel are multiplied with the min(alpha_source, 1 - alpha_destination), alpha is multiplied by one. This can only be used for Source and will override the value set in Destination.)




Line 56: Line 56:
This section determines how the source and destination functions are combined. Options are as follows:
This section determines how the source and destination functions are combined. Options are as follows:


''Add'' - using this option will ?
''Add'' - (Result = Source + Destination)


''Subtract'' - using this option will ?
''Subtract'' - (Result = Source - Destination)


''Reverse Subtract'' - using this option will ?
''Reverse Subtract'' - (Result = Destination - Source)


''Minimum'' - using this option will ?
''Minimum'' - (Result = MIN(Source, Destination))


''Maximum'' - using this option will ?
''Maximum'' - (Result = MAX(Source, Destination))