VkPolygonMode(3)
C Specification
Possible values of theVkPipelineRasterizationStateCreateInfo::polygonMode property ofthe currently active pipeline, specifying the method of rasterization forpolygons, are:
// Provided by VK_VERSION_1_0typedef enum VkPolygonMode { VK_POLYGON_MODE_FILL = 0, VK_POLYGON_MODE_LINE = 1, VK_POLYGON_MODE_POINT = 2, // Provided by VK_NV_fill_rectangle VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000,} VkPolygonMode;Description
VK_POLYGON_MODE_POINT specifies that polygon vertices are drawn aspoints.
VK_POLYGON_MODE_LINE specifies that polygon edges are drawn asline segments.
VK_POLYGON_MODE_FILL specifies that polygons are rendered usingthe polygon rasterization rules in this section.
VK_POLYGON_MODE_FILL_RECTANGLE_NV specifies that polygons arerendered using polygon rasterization rules, modified to consider asample within the primitive if the sample location is inside theaxis-aligned bounding box of the triangle after projection.Note that the barycentric weights used in attribute interpolationcanextend outside the range[0,1] when these primitives are shaded.Special treatment is given to a sample position on the boundary edge ofthe bounding box.In such a case, if two rectangles lie on either side of a common edge(with identical endpoints) on which a sample position lies, then exactlyone of the trianglesmust produce a fragment that covers that sampleduring rasterization.
Polygons rendered inVK_POLYGON_MODE_FILL_RECTANGLE_NV modemay beclipped by the frustum or by user clip planes.If clipping is applied, the triangle is culled rather than clipped.
Area calculation and facingness are determined forVK_POLYGON_MODE_FILL_RECTANGLE_NV mode using the triangle’s vertices.
These modes affect only the final rasterization of polygons: in particular,a polygon’s vertices are shaded and the polygon is clipped and possiblyculled before these modes are applied.
IfVkPhysicalDeviceMaintenance5Properties::polygonModePointSizeisVK_TRUE, the point size of the final rasterization of polygons istaken fromPointSize whenpolygon mode isVK_POLYGON_MODE_POINT.
Otherwise, ifVkPhysicalDeviceMaintenance5Properties::polygonModePointSize isVK_FALSE, the point size of the final rasterization of polygons is 1.0whenpolygon mode isVK_POLYGON_MODE_POINT.
Document Notes
For more information, see theVulkan Specification.
This page is extracted from the Vulkan Specification.Fixes and changes should be made to the Specification, not directly.