Moar docs, mostly context.
[mesa.git] / src / gallium / docs / source / cso / rasterizer.rst
1 .. _rasterizer:
2
3 Rasterizer
4 ==========
5
6 The rasterizer is the main chunk of state controlling how vertices are
7 interpolated into fragments.
8
9 Members
10 -------
11
12 XXX undocumented light_twoside, front_winding, cull_mode, fill_cw, fill_ccw, offset_cw, offset_ccw
13 XXX moar undocumented poly_smooth, line_stipple_factor, line_last_pixel, offset_units, offset_scale
14 XXX sprite_coord_mode
15
16 flatshade
17 If set, the provoking vertex of each polygon is used to determine the
18 color of the entire polygon. If not set, the color fragments will be
19 interpolated from each vertex's color.
20 scissor
21 Whether the scissor test is enabled.
22 poly_stipple_enable
23 Whether polygon stippling is enabled.
24 point_smooth
25 Whether points should be smoothed. Point smoothing turns rectangular
26 points into circles or ovals.
27 point_sprite
28 Whether point sprites are enabled.
29 point_size_per_vertex
30 Whether vertices have a point size element.
31 multisample
32 Whether MSAA is enabled.
33 line_smooth
34 Whether lines should be smoothed. Line smoothing is simply anti-aliasing.
35 line_stipple_enable
36 Whether line stippling is enabled.
37 line_stipple_pattern
38 16-bit bitfield of on/off flags, used to pattern the line stipple.
39 bypass_vs_clip_and_viewport
40 Whether the entire TCL pipeline should be bypassed. This implies that
41 vertices are pre-transformed for the viewport, and will not be run
42 through the vertex shader. Note that implementations may still clip away
43 vertices that are not in the viewport.
44 flatshade_first
45 Whether the first vertex should be the provoking vertex, for most
46 primitives. If not set, the last vertex is the provoking vertex.
47 gl_rasterization_rules
48 Whether the rasterizer should use (0.5, 0.5) pixel centers. When not set,
49 the rasterizer will use (0, 0) for pixel centers.
50 line_width
51 The width of lines.
52 point_size
53 The size of points, if not specified per-vertex.
54 point_size_min
55 The minimum size of points.
56 point_size_max
57 The maximum size of points.
58
59 Notes
60 -----
61
62 flatshade
63 ^^^^^^^^^
64
65 The actual interpolated shading algorithm is obviously
66 implementation-dependent, but will usually be Gourard for most hardware.
67
68 bypass_vs_clip_and_viewport
69 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
70
71 When set, this implies that vertices are pre-transformed for the viewport, and
72 will not be run through the vertex shader. Note that implementations may still
73 clip away vertices that are not visible.
74
75 flatshade_first
76 ^^^^^^^^^^^^^^^
77
78 There are several important exceptions to the specification of this rule.
79
80 * PIPE_PRIMITIVE_POLYGON: The provoking vertex is always the first vertex.
81 If the caller wishes to change the provoking vertex, they merely need to
82 rotate the vertices themselves.
83 * PIPE_PRIMITIVE_QUAD, PIPE_PRIMITIVE_QUAD_STRIP: This option has no effect.
84 * PIPE_PRIMITIVE_TRIANGLE_FAN: When set, the provoking vertex is the second
85 vertex, not the first. This permits each segment of the fan to have a
86 different color.