• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2017-2022 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 requires
13    {spirv}/KHR/SPV_KHR_fragment_shading_rate.html[`SPV_KHR_fragment_shading_rate`].
14  - This extension provides API support for
15    {GLSLregistry}/ext/GLSL_EXT_fragment_shading_rate.txt[`GL_EXT_fragment_shading_rate`]
16*Contributors*::
17  - Tobias Hector, AMD
18  - Guennadi Riguer, AMD
19  - Matthaeus Chajdas, AMD
20  - Pat Brown, Nvidia
21  - Matthew Netsch, Qualcomm
22  - Slawomir Grajewski, Intel
23  - Jan-Harald Fredriksen, Arm
24  - Jeff Bolz, Nvidia
25  - Arseny Kapoulkine, Roblox
26  - Contributors to the VK_NV_shading_rate_image specification
27  - Contributors to the VK_EXT_fragment_density_map specification
28
29=== Description
30
31This extension adds the ability to change the rate at which fragments are
32shaded.
33Rather than the usual single fragment invocation for each pixel covered by a
34primitive, multiple pixels can be shaded by a single fragment shader
35invocation.
36
37Up to three methods are available to the application to change the fragment
38shading rate:
39
40  - <<primsrast-fragment-shading-rate-pipeline>>, which allows the
41    specification of a rate per-draw.
42  - <<primsrast-fragment-shading-rate-primitive>>, which allows the
43    specification of a rate per primitive, specified during shading.
44  - <<primsrast-fragment-shading-rate-attachment>>, which allows the
45    specification of a rate per-region of the framebuffer, specified in a
46    specialized image attachment.
47
48Additionally, these rates can all be specified and combined in order to
49adjust the overall detail in the image at each point.
50
51This functionality can be used to focus shading efforts where higher levels
52of detail are needed in some parts of a scene compared to others.
53This can be particularly useful in high resolution rendering, or for XR
54contexts.
55
56This extension also adds support for the `SPV_KHR_fragment_shading_rate`
57extension which enables setting the
58<<primsrast-fragment-shading-rate-primitive, primitive fragment shading
59rate>>, and allows querying the final shading rate from a fragment shader.
60
61include::{generated}/interfaces/VK_KHR_fragment_shading_rate.adoc[]
62
63=== Version History
64
65  * Revision 1, 2020-05-06 (Tobias Hector)
66  ** Initial revision
67  * Revision 2, 2021-09-30 (Jon Leech)
68  ** Add interaction with `apiext:VK_KHR_format_feature_flags2` to `vk.xml`
69