Merge branch '7.8'
[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 Blend Factors
10 -------------
11
12 The blend factors largely follow the same pattern as their counterparts
13 in other modern and legacy drawing APIs.
14
15 XXX blurb about dual-source blends
16
17 Members
18 -------
19
20 independent_blend_enable
21 If enabled, blend state is different for each render target, and
22 for each render target set in the respective member of the rt array.
23 If disabled, blend state is the same for all render targets, and only
24 the first member of the rt array contains valid data.
25 logicop_enable
26 Enables logic ops. Cannot be enabled at the same time as blending, and
27 is always the same for all render targets.
28 logicop_func
29 The logic operation to use if logic ops are enabled. One of PIPE_LOGICOP.
30 dither
31 Whether dithering is enabled. Note: Dithering is implementation-dependent.
32 rt
33 Contains the per-rendertarget blend state.
34
35 Per-rendertarget Members
36 ------------------------
37
38 blend_enable
39 If blending is enabled, perform a blend calculation according to blend
40 functions and source/destination factors. Otherwise, the incoming fragment
41 color gets passed unmodified (but colormask still applies).
42 rgb_func
43 The blend function to use for rgb channels. One of PIPE_BLEND.
44 rgb_src_factor
45 The blend source factor to use for rgb channels. One of PIPE_BLENDFACTOR.
46 rgb_dst_factor
47 The blend destination factor to use for rgb channels. One of PIPE_BLENDFACTOR.
48 alpha_func
49 The blend function to use for the alpha channel. One of PIPE_BLEND.
50 alpha_src_factor
51 The blend source factor to use for the alpha channel. One of PIPE_BLENDFACTOR.
52 alpha_dst_factor
53 The blend destination factor to use for alpha channel. One of PIPE_BLENDFACTOR.
54 colormask
55 Bitmask of which channels to write. Combination of PIPE_MASK bits.