GL_OES_shader_multisample_interpolation#
Supported Hardware#
Series6, Series6XE, Series6XT
Valid APIs#
OpenGL ES 3.x
Description#
This extension is one of three extensions which enhances OpenGL ES’s programmability with respect to how multisampling is performed:
GL_OES_sample_variables
GL_OES_sample_shading
GL_OES_shader_multisample_interpolation
GL_OES_shader_multisample_interpolation adds functions to GLSL that allow fragment inputs to be interpolated at locations other than just the centroid, such as specific sample locations, or at a given offset (within an implementation-defined range).
Example#
#extension GL_OES_sample_variables : require
#extension GL_OES_shader_multisample_interpolation : require
// A sample-rate input. Operations using this must be calculated separately for each sample.
// It is automatically interpolated at each sample location, rather than the centroid.
sample in highp vec2 sampleTextureCoords;
// A standard input
in highp vec4 normal;
void main()
{
...
// Get the normals for each sample location - as if it were declared with 'sample'
highp vec4 sampleNormal = interpolateAtSample(normal, gl_SampleID);
...
}