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