Difference between revisions of "EffectShader"

718 bytes added ,  22:49, 17 August 2013
imported>Danielleonyett
imported>Danielleonyett
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'' - (Result = Source + Destination)
''Add'' - (Result = Source + Destination) (This blend mode simply adds pixel values of one layer with the other. In case of values above 1 (in the case of RGB), white is displayed.)


''Subtract'' - (Result = Source - Destination)
''Subtract'' - (Result = Source - Destination) (This blend mode simply subtracts pixel values of one layer with the other. In case of negative values, black is displayed.)


''Reverse Subtract'' - (Result = Destination - Source)
''Reverse Subtract'' - (Result = Destination - Source) (Difference subtracts the top layer from the bottom layer or the other way round, to always get a positive value. Blending with black produces no change, as values for all colors are 0. (The RGB value for black is 0,0,0). Blending with white inverts the picture.)


''Minimum'' - (Result = MIN(Source, Destination))
''Minimum'' - (Result = MIN(Source, Destination)) (Creates a resultant pixel that retains the smallest components of the foreground and background pixels.)


''Maximum'' - (Result = MAX(Source, Destination))
''Maximum'' - (Result = MAX(Source, Destination)) (Selects the maximum of each component from the foreground and background pixels.)