By default, OpenGL runs a fragment shader once for each pixel covered by a primitive being rasterized. When using multisampling, the outputs of that
fragment shader are broadcast to each covered sample of the fragment's pixel. When using multisampling, applications can optionally request that the
fragment shader be run once per color sample (e.g., by using the "sample" qualifier on one or more active fragment shader inputs), or run a minimum
number of times per pixel using SAMPLE_SHADING enable and the MinSampleShading frequency value.
This extension allows applications to specify fragment shading rates of less than 1 invocation per pixel. Instead of invoking the fragment shader once for each covered pixel, the fragment shader can be run once for a group of adjacent pixels in the framebuffer. The outputs of that fragment shader invocation are broadcast to each covered sample for all of the pixels in the group. The initial version of this extension allows for groups of 1, 2, 4, 8, and 16 pixels.
This can be useful for effects like motion volumetric rendering where a portion of scene is processed at full shading rate and a portion can be processed at a reduced shading rate, saving power and processing resources. The requested rate can vary from (finest and default) 1 fragment shader invocation per pixel to (coarsest) one fragment shader invocation for each 4x4 block of pixels.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static native void | glFramebufferShadingRateEXT(int target, int attachment, int texture, int baseLayer, int numLayers, int texelWidth, int texelHeight)
|
| public static void | |
| public static void | glGetFragmentShadingRatesEXT(int samples, int[] count, int[] shadingRates)
Array version of: |
| public static native void | |
| public static native void | |
| public static native void |
| GL_FRAGMENT_SHADING_RATE_ATTACHMENT_WITH_DEFAULT_FRAMEBUFFER_SUPPORTED_EXT | back to summary |
|---|---|
| public static final int GL_FRAGMENT_SHADING_RATE_ATTACHMENT_WITH_DEFAULT_FRAMEBUFFER_SUPPORTED_EXT Accepted by the | |
| GL_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT | back to summary |
|---|---|
| public static final int GL_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT Accepted by the | |
| GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT | back to summary |
|---|---|
| public static final int GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT Accepted by the | |
| GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT | back to summary |
|---|---|
| public static final int GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT Accepted by the | |
| GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT | back to summary |
|---|---|
| public static final int GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT Accepted by the | |
| GL_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT | back to summary |
|---|---|
| public static final int GL_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT Accepted by the | |
| GL_FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT | back to summary |
|---|---|
| public static final int GL_FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT Accepted by the | |
| GL_FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT | back to summary |
|---|---|
| public static final int GL_FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT Accepted by the | |
| GL_FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXT | back to summary |
|---|---|
| public static final int GL_FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXT Accepted by the | |
| GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT | back to summary |
|---|---|
| public static final int GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT Accepted by the | |
| GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT | back to summary |
|---|---|
| public static final int GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT Accepted by the | |
| GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT | back to summary |
|---|---|
| public static final int GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT Accepted by the | |
| GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT | back to summary |
|---|---|
| public static final int GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT Accepted by the | |
| GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT | back to summary |
|---|---|
| public static final int GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT Accepted by the | |
| GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT | back to summary |
|---|---|
| public static final int GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT Accepted by the | |
| GL_SHADING_RATE_1X1_PIXELS_EXT | back to summary |
|---|---|
| public static final int GL_SHADING_RATE_1X1_PIXELS_EXT Allowed in the | |
| GL_SHADING_RATE_1X2_PIXELS_EXT | back to summary |
|---|---|
| public static final int GL_SHADING_RATE_1X2_PIXELS_EXT Allowed in the | |
| GL_SHADING_RATE_1X4_PIXELS_EXT | back to summary |
|---|---|
| public static final int GL_SHADING_RATE_1X4_PIXELS_EXT Allowed in the | |
| GL_SHADING_RATE_2X1_PIXELS_EXT | back to summary |
|---|---|
| public static final int GL_SHADING_RATE_2X1_PIXELS_EXT Allowed in the | |
| GL_SHADING_RATE_2X2_PIXELS_EXT | back to summary |
|---|---|
| public static final int GL_SHADING_RATE_2X2_PIXELS_EXT Allowed in the | |
| GL_SHADING_RATE_2X4_PIXELS_EXT | back to summary |
|---|---|
| public static final int GL_SHADING_RATE_2X4_PIXELS_EXT Allowed in the | |
| GL_SHADING_RATE_4X1_PIXELS_EXT | back to summary |
|---|---|
| public static final int GL_SHADING_RATE_4X1_PIXELS_EXT Allowed in the | |
| GL_SHADING_RATE_4X2_PIXELS_EXT | back to summary |
|---|---|
| public static final int GL_SHADING_RATE_4X2_PIXELS_EXT Allowed in the | |
| GL_SHADING_RATE_4X4_PIXELS_EXT | back to summary |
|---|---|
| public static final int GL_SHADING_RATE_4X4_PIXELS_EXT Allowed in the | |
| GL_SHADING_RATE_ATTACHMENT_EXT | back to summary |
|---|---|
| public static final int GL_SHADING_RATE_ATTACHMENT_EXT Accepted by the | |
| GL_SHADING_RATE_EXT | back to summary |
|---|---|
| public static final int GL_SHADING_RATE_EXT Accepted by the | |
| EXTFragmentShadingRate | back to summary |
|---|---|
| protected EXTFragmentShadingRate() | |
| glFramebufferShadingRateEXT | back to summary |
|---|---|
| public static native void glFramebufferShadingRateEXT(int target, int attachment, int texture, int baseLayer, int numLayers, int texelWidth, int texelHeight) | |
| glGetFragmentShadingRatesEXT | back to summary |
|---|---|
| public static void glGetFragmentShadingRatesEXT(int samples, IntBuffer count, IntBuffer shadingRates) | |
| glGetFragmentShadingRatesEXT | back to summary |
|---|---|
| public static void glGetFragmentShadingRatesEXT(int samples, int[] count, int[] shadingRates) Array version of: | |
| glShadingRateCombinerOpsEXT | back to summary |
|---|---|
| public static native void glShadingRateCombinerOpsEXT(int combinerOp0, int combinerOp1) | |
| glShadingRateEXT | back to summary |
|---|---|
| public static native void glShadingRateEXT(int rate) | |
| nglGetFragmentShadingRatesEXT | back to summary |
|---|---|
| public static native void nglGetFragmentShadingRatesEXT(int samples, int maxCount, long count, long shadingRates) | |