Merge commit 'origin/perrtblend'
[mesa.git] / src / gallium / docs / source / cso / blend.rst
1 .. _blend:
2
3 Blend
4 =====
5
6 This state controls blending of the final fragments into the target rendering
7 buffers.
8
9 Members
10 -------
11
12 independent_blend_enable
13 If enabled, blend state is different for each render target, and
14 for each render target set in the respective member of the rt array.
15 If disabled, blend state is the same for all render targets, and only
16 the first member of the rt array contains valid data.
17 logicop_enable
18 Enables logic ops. Cannot be enabled at the same time as blending, and
19 is always the same for all render targets.
20 logicop_func
21 The logic operation to use if logic ops are enabled. One of PIPE_LOGICOP.
22 dither
23 Whether dithering is enabled.
24 rt
25 Contains the per rendertarget blend state.
26
27 per rendertarget members
28 ------------------------
29
30 blend_enable
31 If blending is enabled, perform a blend calculation according to blend
32 functions and source/destination factors. Otherwise, the incoming fragment
33 color gets passed unmodified (but colormask still applies).
34 rgb_func
35 The blend function to use for rgb channels. One of PIPE_BLEND.
36 rgb_src_factor
37 The blend source factor to use for rgb channels. One of PIPE_BLENDFACTOR.
38 rgb_dst_factor
39 The blend destination factor to use for rgb channels. One of PIPE_BLENDFACTOR.
40 alpha_func
41 The blend function to use for the alpha channel. One of PIPE_BLEND.
42 alpha_src_factor
43 The blend source factor to use for the alpha channel. One of PIPE_BLENDFACTOR.
44 alpha_dst_factor
45 The blend destination factor to use for alpha channel. One of PIPE_BLENDFACTOR.
46 colormask
47 Bitmask of which channels to write. Combination of PIPE_MASK bits.