docs: Cleanup Rasterizer a bit.
I'm getting better at this, I think.
This commit is contained in:
@@ -11,19 +11,56 @@ multisample state, scissoring and flat/smooth shading.
|
|||||||
Members
|
Members
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
bypass_vs_clip_and_viewport
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Whether the entire TCL pipeline should be bypassed. This implies that
|
||||||
|
vertices are pre-transformed for the viewport, and will not be run
|
||||||
|
through the vertex shader.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Implementations may still clip away vertices that are not in the viewport
|
||||||
|
when this is set.
|
||||||
|
|
||||||
flatshade
|
flatshade
|
||||||
If set, the provoking vertex of each polygon is used to determine the
|
^^^^^^^^^
|
||||||
color of the entire polygon. If not set, fragment colors will be
|
|
||||||
interpolated between the vertex colors.
|
If set, the provoking vertex of each polygon is used to determine the color
|
||||||
Note that this is separate from the fragment shader input attributes
|
of the entire polygon. If not set, fragment colors will be interpolated
|
||||||
CONSTANT, LINEAR and PERSPECTIVE. We need the flatshade state at
|
between the vertex colors.
|
||||||
|
|
||||||
|
The actual interpolated shading algorithm is obviously
|
||||||
|
implementation-dependent, but will usually be Gourard for most hardware.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This is separate from the fragment shader input attributes
|
||||||
|
CONSTANT, LINEAR and PERSPECTIVE. The flatshade state is needed at
|
||||||
clipping time to determine how to set the color of new vertices.
|
clipping time to determine how to set the color of new vertices.
|
||||||
Also note that the draw module can implement flat shading by copying
|
|
||||||
the provoking vertex color to all the other vertices in the primitive.
|
:ref:`Draw` can implement flat shading by copying the provoking vertex
|
||||||
|
color to all the other vertices in the primitive.
|
||||||
|
|
||||||
flatshade_first
|
flatshade_first
|
||||||
Whether the first vertex should be the provoking vertex, for most
|
^^^^^^^^^^^^^^^
|
||||||
primitives. If not set, the last vertex is the provoking vertex.
|
|
||||||
|
Whether the first vertex should be the provoking vertex, for most primitives.
|
||||||
|
If not set, the last vertex is the provoking vertex.
|
||||||
|
|
||||||
|
There are several important exceptions to the specification of this rule.
|
||||||
|
|
||||||
|
* ``PIPE_PRIMITIVE_POLYGON``: The provoking vertex is always the first
|
||||||
|
vertex. If the caller wishes to change the provoking vertex, they merely
|
||||||
|
need to rotate the vertices themselves.
|
||||||
|
* ``PIPE_PRIMITIVE_QUAD``, ``PIPE_PRIMITIVE_QUAD_STRIP``: This option has no
|
||||||
|
effect; the provoking vertex is always the last vertex.
|
||||||
|
* ``PIPE_PRIMITIVE_TRIANGLE_FAN``: When set, the provoking vertex is the
|
||||||
|
second vertex, not the first. This permits each segment of the fan to have
|
||||||
|
a different color.
|
||||||
|
|
||||||
|
Other Members
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
light_twoside
|
light_twoside
|
||||||
If set, there are per-vertex back-facing colors. The draw module
|
If set, there are per-vertex back-facing colors. The draw module
|
||||||
@@ -33,6 +70,7 @@ light_twoside
|
|||||||
front_winding
|
front_winding
|
||||||
Indicates the window order of front-facing polygons, either
|
Indicates the window order of front-facing polygons, either
|
||||||
PIPE_WINDING_CW or PIPE_WINDING_CCW
|
PIPE_WINDING_CW or PIPE_WINDING_CCW
|
||||||
|
|
||||||
cull_mode
|
cull_mode
|
||||||
Indicates which polygons to cull, either PIPE_WINDING_NONE (cull no
|
Indicates which polygons to cull, either PIPE_WINDING_NONE (cull no
|
||||||
polygons), PIPE_WINDING_CW (cull clockwise-winding polygons),
|
polygons), PIPE_WINDING_CW (cull clockwise-winding polygons),
|
||||||
@@ -110,43 +148,7 @@ scissor
|
|||||||
multisample
|
multisample
|
||||||
Whether :term:`MSAA` is enabled.
|
Whether :term:`MSAA` is enabled.
|
||||||
|
|
||||||
bypass_vs_clip_and_viewport
|
|
||||||
Whether the entire TCL pipeline should be bypassed. This implies that
|
|
||||||
vertices are pre-transformed for the viewport, and will not be run
|
|
||||||
through the vertex shader. Note that implementations may still clip away
|
|
||||||
vertices that are not in the viewport.
|
|
||||||
|
|
||||||
gl_rasterization_rules
|
gl_rasterization_rules
|
||||||
Whether the rasterizer should use (0.5, 0.5) pixel centers. When not set,
|
Whether the rasterizer should use (0.5, 0.5) pixel centers. When not set,
|
||||||
the rasterizer will use (0, 0) for pixel centers.
|
the rasterizer will use (0, 0) for pixel centers.
|
||||||
|
|
||||||
|
|
||||||
Notes
|
|
||||||
-----
|
|
||||||
|
|
||||||
flatshade
|
|
||||||
^^^^^^^^^
|
|
||||||
|
|
||||||
The actual interpolated shading algorithm is obviously
|
|
||||||
implementation-dependent, but will usually be Gourard for most hardware.
|
|
||||||
|
|
||||||
bypass_vs_clip_and_viewport
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
When set, this implies that vertices are pre-transformed for the viewport, and
|
|
||||||
will not be run through the vertex shader. Note that implementations may still
|
|
||||||
clip away vertices that are not visible.
|
|
||||||
|
|
||||||
flatshade_first
|
|
||||||
^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
There are several important exceptions to the specification of this rule.
|
|
||||||
|
|
||||||
* ``PIPE_PRIMITIVE_POLYGON``: The provoking vertex is always the first
|
|
||||||
vertex. If the caller wishes to change the provoking vertex, they merely
|
|
||||||
need to rotate the vertices themselves.
|
|
||||||
* ``PIPE_PRIMITIVE_QUAD``, ``PIPE_PRIMITIVE_QUAD_STRIP``: This option has no
|
|
||||||
effect; the provoking vertex is always the last vertex.
|
|
||||||
* ``PIPE_PRIMITIVE_TRIANGLE_FAN``: When set, the provoking vertex is the
|
|
||||||
second vertex, not the first. This permits each segment of the fan to have
|
|
||||||
a different color.
|
|
||||||
|
@@ -109,6 +109,8 @@ CSO Cache
|
|||||||
The CSO cache is used to accelerate preparation of state by saving
|
The CSO cache is used to accelerate preparation of state by saving
|
||||||
driver-specific state structures for later use.
|
driver-specific state structures for later use.
|
||||||
|
|
||||||
|
.. _draw:
|
||||||
|
|
||||||
Draw
|
Draw
|
||||||
^^^^
|
^^^^
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user