The rasterization process generates fragments (pixels) from the assembled polygons. The viewport state is used to specify where, in the framebuffer coordinates, fragments will be generated. To specify how (if at all) fragments are generated, we need to prepare a rasterization state.
Specifying a pipeline rasterization state
How to do it...
- Create a variable of type VkPipelineRasterizationStateCreateInfo named rasterization_state_create_info. Use the following values to initialize its members:
- VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO value for sType.
- nullptr value for pNext.
- 0 value for flags.
- For depthClampEnable use a true value if a depth value for fragments whose depth is outside of the min/max range specified in a viewport state should be...