15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    OES_shader_multisample_interpolation
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_OES_shader_multisample_interpolation
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Daniel Koch, NVIDIA Corporation (dkoch 'at' nvidia.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContributors
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Pat Brown, NVIDIA
165bd8deadSopenharmony_ci    Eric Werness, NVIDIA
175bd8deadSopenharmony_ci    Graeme Leese, Broadcom
185bd8deadSopenharmony_ci    Contributors to ARB_gpu_shader5
195bd8deadSopenharmony_ci    Members of the OpenGL ES working group
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciNotice
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    Copyright (c) 2010-2013 The Khronos Group Inc. Copyright terms at
245bd8deadSopenharmony_ci        http://www.khronos.org/registry/speccopyright.html
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ciSpecification Update Policy
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ci    Khronos-approved extension specifications are updated in response to
295bd8deadSopenharmony_ci    issues and bugs prioritized by the Khronos OpenGL ES Working Group. For
305bd8deadSopenharmony_ci    extensions which have been promoted to a core Specification, fixes will
315bd8deadSopenharmony_ci    first appear in the latest version of that core Specification, and will
325bd8deadSopenharmony_ci    eventually be backported to the extension document. This policy is
335bd8deadSopenharmony_ci    described in more detail at
345bd8deadSopenharmony_ci        https://www.khronos.org/registry/OpenGL/docs/update_policy.php
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ciStatus
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    Complete. 
395bd8deadSopenharmony_ci    Ratified by the Khronos Board of Promoters on 2014/03/14.
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ciVersion
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ci    Last Modified Date:         February 11, 2014
445bd8deadSopenharmony_ci    Revision:                   10
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ciNumber
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ci    OpenGL ES Extension #172
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ciDependencies
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ci    OpenGL ES 3.0 and GLSL ES 3.00 required.
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci    This extension is written against the OpenGL ES 3.0.2 (April 8, 2013)
555bd8deadSopenharmony_ci    and the OpenGL ES Shading Language Specification Revision 4
565bd8deadSopenharmony_ci    (March 6, 2013) specifications.
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ci    This extension requires OES_sample_variables.
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ci    This extension interacts with OES_sample_shading.
615bd8deadSopenharmony_ci
625bd8deadSopenharmony_ciOverview
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ci    In standard multisample rendering, an implementation is allowed to
655bd8deadSopenharmony_ci    assign the same sets of fragment shader input values to each sample.
665bd8deadSopenharmony_ci    This can cause aliasing where the fragment shader input values are
675bd8deadSopenharmony_ci    used to generate a result that doesn't antialias itself, for example
685bd8deadSopenharmony_ci    with alpha-tested transparency.
695bd8deadSopenharmony_ci
705bd8deadSopenharmony_ci    This extension adds the "sample" qualifier that can be used on vertex
715bd8deadSopenharmony_ci    outputs and fragment inputs. When the "sample" qualifier is used, the
725bd8deadSopenharmony_ci    fragment shader is invoked separately for each covered sample and
735bd8deadSopenharmony_ci    all such qualified interpolants must be evaluated at the corresponding
745bd8deadSopenharmony_ci    sample point.
755bd8deadSopenharmony_ci
765bd8deadSopenharmony_ci    This extension provides built-in fragment shader functions to provide
775bd8deadSopenharmony_ci    fine-grained control over interpolation, including interpolating a
785bd8deadSopenharmony_ci    fragment shader input at a programmable offset relative to the pixel
795bd8deadSopenharmony_ci    center, a specific sample number, or at the centroid.
805bd8deadSopenharmony_ci
815bd8deadSopenharmony_ciIP Status
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci    No known IP claims.
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ciNew Procedures and Functions
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ci    None
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ciNew Tokens
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
925bd8deadSopenharmony_ci    and GetInteger64v:
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci        MIN_FRAGMENT_INTERPOLATION_OFFSET_OES           0x8E5B
955bd8deadSopenharmony_ci        MAX_FRAGMENT_INTERPOLATION_OFFSET_OES           0x8E5C
965bd8deadSopenharmony_ci        FRAGMENT_INTERPOLATION_OFFSET_BITS_OES          0x8E5D
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL ES 3.0 Specification
995bd8deadSopenharmony_ci(OpenGL Operation)
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci    None
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 3.0 Specification
1045bd8deadSopenharmony_ci(Rasterization)
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ci    Modify Section 3.3, Multisampling, p. 95
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ci    (add new paragraph as the second-last paragraph, at the end of the
1095bd8deadSopenharmony_ci    section, p. 96)
1105bd8deadSopenharmony_ci
1115bd8deadSopenharmony_ci    If the value of SAMPLE_BUFFERS is one and the current program object
1125bd8deadSopenharmony_ci    includes a fragment shader with one or more input variables qualified with
1135bd8deadSopenharmony_ci    "sample in", the data associated with those variables will be assigned
1145bd8deadSopenharmony_ci    independently.  The values for each sample must be evaluated at the
1155bd8deadSopenharmony_ci    location of the sample.  The data associated with any other variables not
1165bd8deadSopenharmony_ci    qualified with "sample in" need not be evaluated independently for each
1175bd8deadSopenharmony_ci    sample.
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ci    Modify Section 3.9.1, Shader Variables, p. 161
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci    (modify the second last paragraph of the section to be as follows, p. 161)
1235bd8deadSopenharmony_ci
1245bd8deadSopenharmony_ci    When interpolating input variables, the default
1255bd8deadSopenharmony_ci    screen-space location at which these variables are sampled is defined in
1265bd8deadSopenharmony_ci    previous rasterization sections.  The default location may be overriden by
1275bd8deadSopenharmony_ci    interpolation qualifiers.  When interpolating variables declared using
1285bd8deadSopenharmony_ci    "centroid in", the variable is sampled at a location within the pixel
1295bd8deadSopenharmony_ci    covered by the primitive generating the fragment.  When interpolating
1305bd8deadSopenharmony_ci    variables declared using "sample in" when the value of SAMPLE_BUFFERS is
1315bd8deadSopenharmony_ci    one, the fragment shader will be invoked separately for each covered sample
1325bd8deadSopenharmony_ci    and the variable will be sampled at the corresponding sample point.
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ci    (add the following paragraph immediately after the above, p. 161)
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ci    Additionally, built-in fragment shader functions provide further
1375bd8deadSopenharmony_ci    fine-grained control over interpolation.  The built-in functions
1385bd8deadSopenharmony_ci    interpolateAtCentroid() and interpolateAtSample() will sample variables as
1395bd8deadSopenharmony_ci    though they were declared with the "centroid" or "sample" qualifiers,
1405bd8deadSopenharmony_ci    respectively.  The built-in function interpolateAtOffset() will sample
1415bd8deadSopenharmony_ci    variables at a specified (x,y) offset relative to the center of the pixel.
1425bd8deadSopenharmony_ci    The range and granularity of offsets supported by this function is
1435bd8deadSopenharmony_ci    implementation-dependent.  If either component of the specified offset is
1445bd8deadSopenharmony_ci    less than MIN_FRAGMENT_INTERPOLATION_OFFSET_OES or greater than
1455bd8deadSopenharmony_ci    MAX_FRAGMENT_INTERPOLATION_OFFSET_OES, the position used to interpolate the
1465bd8deadSopenharmony_ci    variable is undefined.  Not all values of <offset> may be supported; x and
1475bd8deadSopenharmony_ci    y offsets may be rounded to fixed-point values with the number of fraction
1485bd8deadSopenharmony_ci    bits given by the implementation-dependent constant
1495bd8deadSopenharmony_ci    FRAGMENT_INTERPOLATION_OFFSET_BITS_OES.
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL ES 3.0 Specification
1525bd8deadSopenharmony_ci(Per-Fragment Operations and the Framebuffer)
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci    None.
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL ES 3.0 Specification
1575bd8deadSopenharmony_ci(Special Functions)
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ci    None.
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL ES 3.0 Specification
1625bd8deadSopenharmony_ci(State and State Requests)
1635bd8deadSopenharmony_ci
1645bd8deadSopenharmony_ci    None.
1655bd8deadSopenharmony_ci
1665bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL ES 3.0 (Compatibility Profile)
1675bd8deadSopenharmony_ciSpecification (Invariance)
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ci    None.
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ciAdditions to the EGL Specifications
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ci    None.
1745bd8deadSopenharmony_ci
1755bd8deadSopenharmony_ciModifications to The OpenGL ES Shading Language Specification, Version 3.00.04
1765bd8deadSopenharmony_ci
1775bd8deadSopenharmony_ci    Including the following line in a shader can be used to control the
1785bd8deadSopenharmony_ci    language features described in this extension:
1795bd8deadSopenharmony_ci
1805bd8deadSopenharmony_ci      #extension GL_OES_shader_multisample_interpolation : <behavior>
1815bd8deadSopenharmony_ci
1825bd8deadSopenharmony_ci    where <behavior> is as specified in section 3.3.
1835bd8deadSopenharmony_ci
1845bd8deadSopenharmony_ci    New preprocessor #defines are added to the OpenGL ES Shading Language:
1855bd8deadSopenharmony_ci
1865bd8deadSopenharmony_ci      #define GL_OES_shader_multisample_interpolation  1
1875bd8deadSopenharmony_ci
1885bd8deadSopenharmony_ci
1895bd8deadSopenharmony_ci    Modify Section 3.7, Keywords, p. 15
1905bd8deadSopenharmony_ci
1915bd8deadSopenharmony_ci    (add to the keyword list)
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ci      sample
1945bd8deadSopenharmony_ci
1955bd8deadSopenharmony_ci    (remove from the reserved keywords list)
1965bd8deadSopenharmony_ci
1975bd8deadSopenharmony_ci      sample
1985bd8deadSopenharmony_ci
1995bd8deadSopenharmony_ci    Modify Section 4.3, Storage Qualifiers, p. 33
2005bd8deadSopenharmony_ci
2015bd8deadSopenharmony_ci    (add to first table on the page)
2025bd8deadSopenharmony_ci
2035bd8deadSopenharmony_ci      Qualifier         Meaning
2045bd8deadSopenharmony_ci      --------------    ----------------------------------------
2055bd8deadSopenharmony_ci      sample in         linkage with per-sample interpolation
2065bd8deadSopenharmony_ci      sample out        linkage with per-sample interpolation
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci    (modify third paragraph, p. 33) These interpolation qualifiers may only
2095bd8deadSopenharmony_ci    precede the qualifiers in, centroid in, sample in, out, centroid out, or
2105bd8deadSopenharmony_ci    sample out in a declaration.  ...
2115bd8deadSopenharmony_ci
2125bd8deadSopenharmony_ci
2135bd8deadSopenharmony_ci    Modify Section 4.3.4, Input Variables, p. 35
2145bd8deadSopenharmony_ci
2155bd8deadSopenharmony_ci    (modify first paragraph of section) Shader input variables are declared
2165bd8deadSopenharmony_ci    with the in, centroid in, or sample in storage qualifiers. ... Variables
2175bd8deadSopenharmony_ci    declared as in, centroid in, or sample in may not be written to during
2185bd8deadSopenharmony_ci    shader execution. ...
2195bd8deadSopenharmony_ci
2205bd8deadSopenharmony_ci    (modify the last paragraph, p. 35) ... It is an error to use "centroid in",
2215bd8deadSopenharmony_ci    "sample in" or the interpolation qualifiers in a vertex shader input. ...
2225bd8deadSopenharmony_ci
2235bd8deadSopenharmony_ci    (modify third paragraph, p. 36) ...  Fragment shader inputs get
2245bd8deadSopenharmony_ci    per-fragment values, typically interpolated from a previous stage's
2255bd8deadSopenharmony_ci    outputs.  They are declared in fragment shaders with the in, centroid in,
2265bd8deadSopenharmony_ci    or sample in storage qualifiers. ...
2275bd8deadSopenharmony_ci
2285bd8deadSopenharmony_ci    (add to examples immediately below)
2295bd8deadSopenharmony_ci
2305bd8deadSopenharmony_ci      sample in vec4 perSampleColor;
2315bd8deadSopenharmony_ci
2325bd8deadSopenharmony_ci    (replace the last paragraph of section, specifying that "sample" only need
2335bd8deadSopenharmony_ci     be used in the fragment shader) The output of the vertex shader and the
2345bd8deadSopenharmony_ci     input of the fragment shader form an interface.  For this interface,
2355bd8deadSopenharmony_ci     vertex shader output variables and fragment shader input variables of the
2365bd8deadSopenharmony_ci     same name must match in type and qualification, with a few exceptions:
2375bd8deadSopenharmony_ci     The storage qualifiers must, of course, differ (one is in and one is
2385bd8deadSopenharmony_ci     out). Also, the "sample" qualifier may differ.  When the "sample"
2395bd8deadSopenharmony_ci     qualifier does not match, the qualifier declared (if any) in the vertex
2405bd8deadSopenharmony_ci     shader is ignored.
2415bd8deadSopenharmony_ci
2425bd8deadSopenharmony_ci    Modify Section 4.3.6, Output Variables, p. 37
2435bd8deadSopenharmony_ci
2445bd8deadSopenharmony_ci    (modify first paragraph of section) Shader output variables are declared
2455bd8deadSopenharmony_ci    with the out, centroid out, or sample out storage qualifiers. ...
2465bd8deadSopenharmony_ci
2475bd8deadSopenharmony_ci    (modify third paragraph of section) Vertex output variables
2485bd8deadSopenharmony_ci    output per-vertex data and are declared using the out, centroid out, or
2495bd8deadSopenharmony_ci    sample out storage qualifiers. ...
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci    (add to examples immediately below)
2525bd8deadSopenharmony_ci
2535bd8deadSopenharmony_ci      sample out vec4 perSampleColor;
2545bd8deadSopenharmony_ci
2555bd8deadSopenharmony_ci    (modify last paragraph, p. 37) Fragment outputs output per-fragment data
2565bd8deadSopenharmony_ci    and are declared using the out storage qualifier. It is an error to use
2575bd8deadSopenharmony_ci    "centroid out" or "sample out" in a fragment shader. ...
2585bd8deadSopenharmony_ci
2595bd8deadSopenharmony_ci
2605bd8deadSopenharmony_ci    Modify Section 4.3.9, Interpolation, p. 44
2615bd8deadSopenharmony_ci
2625bd8deadSopenharmony_ci    (modify first paragraph of section, add reference to sample in/out) The
2635bd8deadSopenharmony_ci    presence of and type of interpolation is controlled by the storage
2645bd8deadSopenharmony_ci    qualifiers centroid in, sample in, centroid out, and sample out, by the
2655bd8deadSopenharmony_ci    optional interpolation qualifiers smooth, and flat. When no interpolation
2665bd8deadSopenharmony_ci    qualifier is present, smooth interpolation is used. ...
2675bd8deadSopenharmony_ci
2685bd8deadSopenharmony_ci    (modify second paragraph) ... A variable may be qualified as flat centroid
2695bd8deadSopenharmony_ci    or flat sample, which will mean the same thing as qualifying it only as
2705bd8deadSopenharmony_ci    flat.
2715bd8deadSopenharmony_ci
2725bd8deadSopenharmony_ci    (replace last paragraph, p. 44)
2735bd8deadSopenharmony_ci
2745bd8deadSopenharmony_ci    When single-sampling, or for fragment shader input
2755bd8deadSopenharmony_ci    variables qualified with neither "centroid in" nor "sample in", the value
2765bd8deadSopenharmony_ci    is interpolated to the pixel's center and
2775bd8deadSopenharmony_ci    a single value may be assigned to each sample within the pixel, to the
2785bd8deadSopenharmony_ci    extent permitted by the OpenGL ES Specification.
2795bd8deadSopenharmony_ci
2805bd8deadSopenharmony_ci    When multisampling, "centroid" and "sample" may be
2815bd8deadSopenharmony_ci    used to control the location and frequency of the sampling of the
2825bd8deadSopenharmony_ci    qualified fragment shader input.  If a fragment shader input is qualified
2835bd8deadSopenharmony_ci    with "centroid", a single value may be assigned to that variable for all
2845bd8deadSopenharmony_ci    samples in the pixel, but that value must be interpolated at a location
2855bd8deadSopenharmony_ci    that lies in both the pixel and in the primitive being rendered, including
2865bd8deadSopenharmony_ci    any of the pixel's samples covered by the primitive.  Because the location
2875bd8deadSopenharmony_ci    at which the variable is interpolated may be different in neighboring pixels,
2885bd8deadSopenharmony_ci    and derivatives may be computed by computing differences in neighboring pixels,
2895bd8deadSopenharmony_ci    derivatives of centroid-sampled inputs may be less accurate than those for
2905bd8deadSopenharmony_ci    non-centroid interpolated variables.  If a fragment shader input is
2915bd8deadSopenharmony_ci    qualified with "sample", a separate value must be assigned to that
2925bd8deadSopenharmony_ci    variable for each covered sample in the pixel, and that value must be
2935bd8deadSopenharmony_ci    sampled at the location of the individual sample.
2945bd8deadSopenharmony_ci
2955bd8deadSopenharmony_ci
2965bd8deadSopenharmony_ci    Modify Section 8.9, Fragment Processing Functions, p. 99
2975bd8deadSopenharmony_ci
2985bd8deadSopenharmony_ci    (add new functions to the end of section, p. 101)
2995bd8deadSopenharmony_ci
3005bd8deadSopenharmony_ci    Built-in interpolation functions are available to compute an interpolated
3015bd8deadSopenharmony_ci    value of a fragment shader input variable at a shader-specified (x,y)
3025bd8deadSopenharmony_ci    location.  A separate (x,y) location may be used for each invocation of
3035bd8deadSopenharmony_ci    the built-in function, and those locations may differ from the default
3045bd8deadSopenharmony_ci    (x,y) location used to produce the default value of the input.
3055bd8deadSopenharmony_ci    For the interpolateAt* functions, the call will return a precision
3065bd8deadSopenharmony_ci    qualification matching the precision of the "interpolant" argument to
3075bd8deadSopenharmony_ci    the function call.
3085bd8deadSopenharmony_ci
3095bd8deadSopenharmony_ci      float interpolateAtCentroid(float interpolant);
3105bd8deadSopenharmony_ci      vec2 interpolateAtCentroid(vec2 interpolant);
3115bd8deadSopenharmony_ci      vec3 interpolateAtCentroid(vec3 interpolant);
3125bd8deadSopenharmony_ci      vec4 interpolateAtCentroid(vec4 interpolant);
3135bd8deadSopenharmony_ci
3145bd8deadSopenharmony_ci      float interpolateAtSample(float interpolant, int sample);
3155bd8deadSopenharmony_ci      vec2 interpolateAtSample(vec2 interpolant, int sample);
3165bd8deadSopenharmony_ci      vec3 interpolateAtSample(vec3 interpolant, int sample);
3175bd8deadSopenharmony_ci      vec4 interpolateAtSample(vec4 interpolant, int sample);
3185bd8deadSopenharmony_ci
3195bd8deadSopenharmony_ci      float interpolateAtOffset(float interpolant, vec2 offset);
3205bd8deadSopenharmony_ci      vec2 interpolateAtOffset(vec2 interpolant, vec2 offset);
3215bd8deadSopenharmony_ci      vec3 interpolateAtOffset(vec3 interpolant, vec2 offset);
3225bd8deadSopenharmony_ci      vec4 interpolateAtOffset(vec4 interpolant, vec2 offset);
3235bd8deadSopenharmony_ci
3245bd8deadSopenharmony_ci    The function interpolateAtCentroid() will return the value of the input
3255bd8deadSopenharmony_ci    <interpolant> sampled at a location inside the both the pixel and
3265bd8deadSopenharmony_ci    the primitive being processed.  The value obtained would be the same value
3275bd8deadSopenharmony_ci    assigned to the input variable if declared with the "centroid" qualifier.
3285bd8deadSopenharmony_ci
3295bd8deadSopenharmony_ci    The function interpolateAtSample() will return the value of the input
3305bd8deadSopenharmony_ci    <interpolant> variable at the location of the sample numbered <sample>.  If
3315bd8deadSopenharmony_ci    multisample buffers are not available, the input varying will be evaluated
3325bd8deadSopenharmony_ci    at the center of the pixel.  If sample <sample> does
3335bd8deadSopenharmony_ci    not exist, the position used to interpolate the input varying is
3345bd8deadSopenharmony_ci    undefined.
3355bd8deadSopenharmony_ci
3365bd8deadSopenharmony_ci    The function interpolateAtOffset() will return the value of the input
3375bd8deadSopenharmony_ci    <interpolant> variable sampled at an offset from the center of the pixel
3385bd8deadSopenharmony_ci    specified by <offset>.  The two floating-point components of <offset>
3395bd8deadSopenharmony_ci    give the offset in pixels in the x and y directions, respectively.
3405bd8deadSopenharmony_ci    An offset of (0,0) identifies the center of the pixel.  The range and
3415bd8deadSopenharmony_ci    granularity of offsets supported by this function is
3425bd8deadSopenharmony_ci    implementation-dependent.
3435bd8deadSopenharmony_ci
3445bd8deadSopenharmony_ci    For all of the interpolation functions, <interpolant> must be an input
3455bd8deadSopenharmony_ci    variable or an element of an input variable declared as an array.
3465bd8deadSopenharmony_ci    Component selection operators (e.g., ".xy") may not be used when
3475bd8deadSopenharmony_ci    specifying <interpolant>.  If <interpolant> is declared with a "flat"
3485bd8deadSopenharmony_ci    qualifier, the interpolated value will have the same value everywhere for
3495bd8deadSopenharmony_ci    a single primitive, so the location used for the interpolation has no
3505bd8deadSopenharmony_ci    effect and the functions just return that same value.  If <interpolant>
3515bd8deadSopenharmony_ci    is declared with the "centroid" qualifier, the value returned by
3525bd8deadSopenharmony_ci    interpolateAtSample() and interpolateAtOffset() will be evaluated
3535bd8deadSopenharmony_ci    at the specified location, ignoring the location normally used with the
3545bd8deadSopenharmony_ci    "centroid" qualifier.
3555bd8deadSopenharmony_ci
3565bd8deadSopenharmony_ci
3575bd8deadSopenharmony_ci    Modify Section 9, Shading Language Grammar, p. 92
3585bd8deadSopenharmony_ci
3595bd8deadSopenharmony_ci    !!! TBD !!!
3605bd8deadSopenharmony_ci
3615bd8deadSopenharmony_ciDependencies on OES_sample_shading
3625bd8deadSopenharmony_ci
3635bd8deadSopenharmony_ci    This extension builds upon the per-sample shading support provided by
3645bd8deadSopenharmony_ci    OES_sample_shading to provide a new "sample" qualifier on a fragment
3655bd8deadSopenharmony_ci    shader input that forces per-sample shading, and specifies that the value
3665bd8deadSopenharmony_ci    of the input be evaluated per-sample.
3675bd8deadSopenharmony_ci
3685bd8deadSopenharmony_ci    There is no interaction between the extensions, except that shaders using
3695bd8deadSopenharmony_ci    the features of this extension seem likely to use features from
3705bd8deadSopenharmony_ci    OES_sample_shading as well.
3715bd8deadSopenharmony_ci
3725bd8deadSopenharmony_ciErrors
3735bd8deadSopenharmony_ci
3745bd8deadSopenharmony_ci    None.
3755bd8deadSopenharmony_ci
3765bd8deadSopenharmony_ciNew State
3775bd8deadSopenharmony_ci
3785bd8deadSopenharmony_ci    None.
3795bd8deadSopenharmony_ci
3805bd8deadSopenharmony_ciNew Implementation Dependent State
3815bd8deadSopenharmony_ci
3825bd8deadSopenharmony_ci    Add to table 6.28 (Implementation Dependent Values)
3835bd8deadSopenharmony_ci
3845bd8deadSopenharmony_ci                                               Min.
3855bd8deadSopenharmony_ci    Get Value               Type  Get Command  Value  Description                  Sec.
3865bd8deadSopenharmony_ci    ----------------------  ----  -----------  -----  --------------------------   -----
3875bd8deadSopenharmony_ci    MIN_FRAGMENT_INTERP-     R    GetFloatv    -0.5   furthest negative offset     3.9.1
3885bd8deadSopenharmony_ci      OLATION_OFFSET_OES                               for interpolateAtOffset()
3895bd8deadSopenharmony_ci    MAX_FRAGMENT_INTERP-     R    GetFloatv    +0.5   furthest positive offset     3.9.1
3905bd8deadSopenharmony_ci      OLATION_OFFSET_OES                               for interpolateAtOffset()
3915bd8deadSopenharmony_ci    FRAGMENT_INTERPOLATION_  Z+   GetIntegerv    4    subpixel bits for            3.9.1
3925bd8deadSopenharmony_ci      OFFSET_BITS_OES                                  interpolateAtOffset()
3935bd8deadSopenharmony_ci
3945bd8deadSopenharmony_ciIssues
3955bd8deadSopenharmony_ci
3965bd8deadSopenharmony_ci    (0) This extension is based on parts of ARB_gpu_shader5.  What are the
3975bd8deadSopenharmony_ci        major differences?
3985bd8deadSopenharmony_ci
3995bd8deadSopenharmony_ci        1- rebased to ES 3.0
4005bd8deadSopenharmony_ci        2- edits for consistency with GL 4.4/GLSL 440 specs
4015bd8deadSopenharmony_ci        3- removed mention of 'noperspective' interpolation qualifier
4025bd8deadSopenharmony_ci        4- removed mention of multisample enable
4035bd8deadSopenharmony_ci        5- retained tighter interpolation requirements from ES3.0
4045bd8deadSopenharmony_ci        6- moved gl_SampleMaskIn to OES_sample_variables
4055bd8deadSopenharmony_ci        7- added precision statement for the interpolateAt* functions.
4065bd8deadSopenharmony_ci
4075bd8deadSopenharmony_ci        For historical issues, please see Issues 1, 2, 9, 11, and 12 in
4085bd8deadSopenharmony_ci        ARB_gpu_shader5.
4095bd8deadSopenharmony_ci
4105bd8deadSopenharmony_ci    (1) What should we call this extension?
4115bd8deadSopenharmony_ci
4125bd8deadSopenharmony_ci        RESOLVED: It will be called OES_shader_multisample_interpolation
4135bd8deadSopenharmony_ci        since it allows the shader to explicitly control the interpolation
4145bd8deadSopenharmony_ci        used for multisample interpolation.
4155bd8deadSopenharmony_ci
4165bd8deadSopenharmony_ci    (2) "sample" and "centroid" have been split out as "Auxiliary Storage
4175bd8deadSopenharmony_ci        Qualifiers" in GLSL 4.xx specs.  Should we follow the way the
4185bd8deadSopenharmony_ci        extension spec was written, or modify it to be more like GLSL 4.40?
4195bd8deadSopenharmony_ci
4205bd8deadSopenharmony_ci        RESOLVED. Leave it as the original extension was written. The changes
4215bd8deadSopenharmony_ci        in the core spec are related to spec re-ordering which it makes no
4225bd8deadSopenharmony_ci        sense to try to replicate via an extension.
4235bd8deadSopenharmony_ci
4245bd8deadSopenharmony_ci    (3) For Section 4.9.3 when multisample is disabled the ES 300 spec says
4255bd8deadSopenharmony_ci        "the value is interpolated at the pixel's center", however GLSL 440
4265bd8deadSopenharmony_ci        says "the value may be interpolated anywhere within the pixel.  Which
4275bd8deadSopenharmony_ci        behaviour do we want to incorporate?
4285bd8deadSopenharmony_ci
4295bd8deadSopenharmony_ci        RESOLVED. We retain the tighter ES 300 requirement which specifies
4305bd8deadSopenharmony_ci        that the pixel's center must be used.
4315bd8deadSopenharmony_ci
4325bd8deadSopenharmony_ci    (4) What to do with the MULTISAMPLE enable language?
4335bd8deadSopenharmony_ci
4345bd8deadSopenharmony_ci        RESOLVED. OpenGL ES does not support MULTISAMPLE enable. This is
4355bd8deadSopenharmony_ci        determined by the buffer properties, aka the value of SAMPLE_BUFFERS.
4365bd8deadSopenharmony_ci
4375bd8deadSopenharmony_ci    (5) Do we need precision qualifiers on the interpolatAt* functions?
4385bd8deadSopenharmony_ci
4395bd8deadSopenharmony_ci        RESOLVED. Yes. A statement was added for the interpolateAt* functions
4405bd8deadSopenharmony_ci        to clarify that the the precision is taken to from the 'interpolant'
4415bd8deadSopenharmony_ci        argument to the functions.
4425bd8deadSopenharmony_ci
4435bd8deadSopenharmony_ci    (6) Should the shading language built-ins have OES suffixes?
4445bd8deadSopenharmony_ci
4455bd8deadSopenharmony_ci        RESOLVED: No. Per Bug 11637, the WG made a policy decision
4465bd8deadSopenharmony_ci        that GLSL ES identifiers imported without semantic change
4475bd8deadSopenharmony_ci        or subsetting as OES extensions from core GLSL do not carry
4485bd8deadSopenharmony_ci        suffixes. The #extension mechanism must still be used to
4495bd8deadSopenharmony_ci        enable the appropriate extension before the functionality can
4505bd8deadSopenharmony_ci        be used.
4515bd8deadSopenharmony_ci
4525bd8deadSopenharmony_ciRevision History
4535bd8deadSopenharmony_ci
4545bd8deadSopenharmony_ci    Rev.    Date      Author    Changes
4555bd8deadSopenharmony_ci    ----  ----------  --------  -----------------------------------------
4565bd8deadSopenharmony_ci    10    2014-02-12  dkoch     remove GLSL suffixes per Issue 6.
4575bd8deadSopenharmony_ci    9     2014-01-31  pbrown    Add language explicitly not requiring that
4585bd8deadSopenharmony_ci                                "sample" qualifier match between stages (bug
4595bd8deadSopenharmony_ci                                11189), where the fragment qualifier wins.
4605bd8deadSopenharmony_ci    8     2014-01-30  dkoch     rename to OES, clean editing notes
4615bd8deadSopenharmony_ci    7     2013-10-03  dkoch     rewrote overview and dependecies
4625bd8deadSopenharmony_ci    6     2013-09-16  dkoch     renamed to shader_multisample_interpolation
4635bd8deadSopenharmony_ci    5     2013-09-10  dkoch     Mark issue 5 as resolved.
4645bd8deadSopenharmony_ci    4     2013-09-09  dkoch     Require OES_sample_variables
4655bd8deadSopenharmony_ci                                Move gl_SampleMaskIn interaction base extension.
4665bd8deadSopenharmony_ci                                Add precision statement for interpolateAt fn's.
4675bd8deadSopenharmony_ci                                Add a couple new edits for ESSL spec.
4685bd8deadSopenharmony_ci    3     2013-09-03  gleese    Moved sample variables to OES_sample_variables
4695bd8deadSopenharmony_ci    2     2013-08-26  dkoch     resolved issues 2-4 & supporting edits.
4705bd8deadSopenharmony_ci    1     2013-08-13  dkoch     port to ES 3.0
4715bd8deadSopenharmony_ci    0     2013-08-07  dkoch     reduced ARB_gpu_shader5 to sample-related features
472