Top Description Fields Constructors Methods
org.lwjgl.opengles

public Class EXTFragmentShadingRate

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

Native bindings to the EXT_fragment_shading_rate extension.

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.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
GL_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT

Accepted by the combinerOp0 and combinerOp1 parameters of ShadingRateCombinerOpsEXT.

public static final int
GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT

Accepted by the combinerOp0 and combinerOp1 parameters of ShadingRateCombinerOpsEXT.

public static final int
GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT

Accepted by the combinerOp0 and combinerOp1 parameters of ShadingRateCombinerOpsEXT.

public static final int
GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT

Accepted by the combinerOp0 and combinerOp1 parameters of ShadingRateCombinerOpsEXT.

public static final int
GL_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT

Accepted by the combinerOp0 and combinerOp1 parameters of ShadingRateCombinerOpsEXT.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
GL_SHADING_RATE_1X1_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

public static final int
GL_SHADING_RATE_1X2_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

public static final int
GL_SHADING_RATE_1X4_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

public static final int
GL_SHADING_RATE_2X1_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

public static final int
GL_SHADING_RATE_2X2_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

public static final int
GL_SHADING_RATE_2X4_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

public static final int
GL_SHADING_RATE_4X1_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

public static final int
GL_SHADING_RATE_4X2_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

public static final int
GL_SHADING_RATE_4X4_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

public static final int
public static final int
GL_SHADING_RATE_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static native void
glFramebufferShadingRateEXT(int target, int attachment, int texture, int baseLayer, int numLayers, int texelWidth, int texelHeight)

public static void
glGetFragmentShadingRatesEXT(int samples, IntBuffer count, IntBuffer shadingRates)

public static void
glGetFragmentShadingRatesEXT(int samples, int[] count, int[] shadingRates)

Array version of: GetFragmentShadingRatesEXT

public static native void
glShadingRateCombinerOpsEXT(int combinerOp0, int combinerOp1)

public static native void
glShadingRateEXT(int rate)

public static native void
nglGetFragmentShadingRatesEXT(int samples, int maxCount, long count, long shadingRates)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_FRAGMENT_SHADING_RATE_ATTACHMENT_WITH_DEFAULT_FRAMEBUFFER_SUPPORTED_EXTback to summary
public static final int GL_FRAGMENT_SHADING_RATE_ATTACHMENT_WITH_DEFAULT_FRAMEBUFFER_SUPPORTED_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

GL_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXTback to summary
public static final int GL_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT

Accepted by the combinerOp0 and combinerOp1 parameters of ShadingRateCombinerOpsEXT.

GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXTback to summary
public static final int GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT

Accepted by the combinerOp0 and combinerOp1 parameters of ShadingRateCombinerOpsEXT.

GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXTback to summary
public static final int GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT

Accepted by the combinerOp0 and combinerOp1 parameters of ShadingRateCombinerOpsEXT.

GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXTback to summary
public static final int GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT

Accepted by the combinerOp0 and combinerOp1 parameters of ShadingRateCombinerOpsEXT.

GL_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXTback to summary
public static final int GL_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT

Accepted by the combinerOp0 and combinerOp1 parameters of ShadingRateCombinerOpsEXT.

GL_FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXTback to summary
public static final int GL_FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

GL_FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXTback to summary
public static final int GL_FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

GL_FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXTback to summary
public static final int GL_FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXTback to summary
public static final int GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXTback to summary
public static final int GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXTback to summary
public static final int GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXTback to summary
public static final int GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXTback to summary
public static final int GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXTback to summary
public static final int GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

GL_SHADING_RATE_1X1_PIXELS_EXTback to summary
public static final int GL_SHADING_RATE_1X1_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

GL_SHADING_RATE_1X2_PIXELS_EXTback to summary
public static final int GL_SHADING_RATE_1X2_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

GL_SHADING_RATE_1X4_PIXELS_EXTback to summary
public static final int GL_SHADING_RATE_1X4_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

GL_SHADING_RATE_2X1_PIXELS_EXTback to summary
public static final int GL_SHADING_RATE_2X1_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

GL_SHADING_RATE_2X2_PIXELS_EXTback to summary
public static final int GL_SHADING_RATE_2X2_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

GL_SHADING_RATE_2X4_PIXELS_EXTback to summary
public static final int GL_SHADING_RATE_2X4_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

GL_SHADING_RATE_4X1_PIXELS_EXTback to summary
public static final int GL_SHADING_RATE_4X1_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

GL_SHADING_RATE_4X2_PIXELS_EXTback to summary
public static final int GL_SHADING_RATE_4X2_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

GL_SHADING_RATE_4X4_PIXELS_EXTback to summary
public static final int GL_SHADING_RATE_4X4_PIXELS_EXT

Allowed in the rate parameter in ShadingRateEXT.

GL_SHADING_RATE_ATTACHMENT_EXTback to summary
public static final int GL_SHADING_RATE_ATTACHMENT_EXT

Accepted by the attachment parameter of FramebufferShadingRateEXT and GetFramebufferAttachmentParameteriv.

GL_SHADING_RATE_EXTback to summary
public static final int GL_SHADING_RATE_EXT

Accepted by the pname parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetInteger64v.

Constructor Detail

EXTFragmentShadingRateback to summary
protected EXTFragmentShadingRate()

Method Detail

glFramebufferShadingRateEXTback to summary
public static native void glFramebufferShadingRateEXT(int target, int attachment, int texture, int baseLayer, int numLayers, int texelWidth, int texelHeight)
glGetFragmentShadingRatesEXTback to summary
public static void glGetFragmentShadingRatesEXT(int samples, IntBuffer count, IntBuffer shadingRates)
glGetFragmentShadingRatesEXTback to summary
public static void glGetFragmentShadingRatesEXT(int samples, int[] count, int[] shadingRates)

Array version of: GetFragmentShadingRatesEXT

glShadingRateCombinerOpsEXTback to summary
public static native void glShadingRateCombinerOpsEXT(int combinerOp0, int combinerOp1)
glShadingRateEXTback to summary
public static native void glShadingRateEXT(int rate)
nglGetFragmentShadingRatesEXTback to summary
public static native void nglGetFragmentShadingRatesEXT(int samples, int maxCount, long count, long shadingRates)