Difference between revisions of "EffectShader"

Jump to navigation Jump to search
Line 21: Line 21:
* The '''source blend mode''' is something that we multiply by the source color.
* The '''source blend mode''' is something that we multiply by the source color.
* The '''destination blend mode''' is something that we multiply by the destination color.
* The '''destination blend mode''' is something that we multiply by the destination color.
* The '''blend operation''' is a simple math operation (e.g. addition, subtraction) that is applied to the source and destination colors ''after'' we've multiplied them by something, with the source on the lefthand side and the destination on the righthand side. This operation combines the two colors into a final result, which is used as the color of the pixel that the player sees on-screen.
* The '''blend operation''' is a simple math operation (e.g. addition, subtraction) that is applied to the source and destination colors ''after'' we've multiplied them by something. This operation combines the two colors into a final result, which is used as the color of the pixel that the player sees on-screen.


Colors are commonly represented as a set of three integers in the range [0, 255] — red, green, and blue — but for the math performed here, they're each treated as decimal values in the range [0, 1].
Colors are commonly represented as a set of three integers in the range [0, 255] — red, green, and blue — but for the math performed here, they're each treated as decimal values in the range [0, 1].
142

edits

Navigation menu