Specifying a pipeline rasterization state
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.
How to do it...
- Create a variable of type
VkPipelineRasterizationStateCreateInfonamedrasterization_state_create_info. Use the following values to initialize its members:VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFOvalue forsType.nullptrvalue forpNext.0value forflags.- For
depthClampEnableuse atruevalue if a depth value for fragments whose depth is outside of the min/max range specified in a viewport state should be clamped within this range, or use afalsevalue if fragments with depth outside of the this range should be clipped (discarded); when thedepthClampEnablefeature is not enabled only afalsevalue can be specified. - For
rasterizerDiscardEnable...