From ce9d6e8ad28b2d84d1a292a871c23b66a4654b54 Mon Sep 17 00:00:00 2001
From: David Thompson
Rendering a scene often involves drawing layers of objects that overlap each other. Blending determines how two overlapping pixels are combined in the final image that is rendered to the screen. -Chickadee provides the following blend modes:
-replace
-Use the latest color, ignoring all others.
-
-alpha
-Blend pixels according to the values of their alpha channels. This is
-the most commonly used blend mode and thus is Chickadee’s default
-mode.
-
-add
-Add all pixel color values together. The more colors blended
+Chickadee provides the following blend modes: +
+Blend pixels according to the values of their alpha channels. This is +the most commonly used blend mode. +
Overwrite the output pixel color with the color being drawn. +
Add all pixel color values together. The more colors blended together, the more white the final color becomes. +
subtract
-Subtract all pixel color values. The more colors blended together,
+Subtract all pixel color values. The more colors blended together, the more black the final color becomes. +
multiply
+darken
+lighten
+screen
+Custom blend modes can be created using the make-blend-mode
procedure:
+
Return a new custom blend mode that applies source-function to +the source color, destination-function to the destination color, +and finally applies equation to the transformed +source/destination color values. These arguments are not +procedures, but symbolic representations of the functions that OpenGL +supports. +
+Valid values for equation are: +
+add
+subtract
+reverse-subtract
+min
+max
+alpha-min
+alpha-max
Valid values for source-function are: +
+zero
+one
+destination-color
+one-minus-destination-color
+source-alpha-saturate
+source-alpha
+one-minus-source-alpha
+destination-alpha
+one-minus-destination-alpha
+constant-color
+one-minus-constant-color
+constant-alpha
+one-minus-constant-alpha
+Valid values for destination-function are: +
+zero
+one
+source-color
+one-minus-source-color
+source-alpha
+one-minus-source-alpha
+destination-alpha
+one-minus-destination-alpha
+constant-color
+one-minus-constant-color
+constant-alpha
+one-minus-constant-alpha
++Next: Framebuffers, Previous: 3D Models, Up: Graphics [Contents][Index]
+