1// Copyright 2017-2021 The Khronos Group, Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5include::{generated}/meta/{refprefix}VK_KHR_fragment_shading_rate.txt[] 6 7=== Other Extension Metadata 8 9*Last Modified Date*:: 10 2021-09-30 11*Interactions and External Dependencies*:: 12 - This extension requires 13 {spirv}/KHR/SPV_KHR_fragment_shading_rate.html[`SPV_KHR_fragment_shading_rate`]. 14*Contributors*:: 15 - Tobias Hector, AMD 16 - Guennadi Riguer, AMD 17 - Matthaeus Chajdas, AMD 18 - Pat Brown, Nvidia 19 - Matthew Netsch, Qualcomm 20 - Slawomir Grajewski, Intel 21 - Jan-Harald Fredriksen, Arm 22 - Jeff Bolz, Nvidia 23 - Contributors to the VK_NV_shading_rate_image specification 24 - Contributors to the VK_EXT_fragment_density_map specification 25 26=== Description 27 28This extension adds the ability to change the rate at which fragments are 29shaded. 30Rather than the usual single fragment invocation for each pixel covered by a 31primitive, multiple pixels can be shaded by a single fragment shader 32invocation. 33 34Up to three methods are available to the application to change the fragment 35shading rate: 36 37 - <<primsrast-fragment-shading-rate-pipeline>>, which allows the 38 specification of a rate per-draw. 39 - <<primsrast-fragment-shading-rate-primitive>>, which allows the 40 specification of a rate per primitive, specified during shading. 41 - <<primsrast-fragment-shading-rate-attachment>>, which allows the 42 specification of a rate per-region of the framebuffer, specified in a 43 specialized image attachment. 44 45Additionally, these rates can all be specified and combined in order to 46adjust the overall detail in the image at each point. 47 48This functionality can be used to focus shading efforts where higher levels 49of detail are needed in some parts of a scene compared to others. 50This can be particularly useful in high resolution rendering, or for XR 51contexts. 52 53This extension also adds support for the `SPV_KHR_fragment_shading_rate` 54extension which enables setting the 55<<primsrast-fragment-shading-rate-primitive, primitive fragment shading 56rate>>, and allows querying the final shading rate from a fragment shader. 57 58include::{generated}/interfaces/VK_KHR_fragment_shading_rate.txt[] 59 60=== Version History 61 62 * Revision 1, 2020-05-06 (Tobias Hector) 63 - Initial revision 64 * Revision 2, 2021-09-30 (Jon Leech) 65 - Add interaction with `apiext:VK_KHR_format_feature_flags2` to `vk.xml` 66