Name

    AMD_seamless_cubemap_per_texture

Name Strings

    GL_AMD_seamless_cubemap_per_texture

Contributors

    Pierre Boudier
    Graham Sellers
    Ahmet Oguz Akyuz

Contact

    Graham Sellers, AMD (graham.sellers 'at' amd.com)

Status

    In Progress.

Version

    Last Modified Date:         February 3, 2017
    Author revision:            7

Number

    383

Dependencies

    OpenGL 1.1 is required.

    ARB_texture_cube_map is required.

    ARB_seamless_cube_map affects the definition of this extension.

    This extension is written against the OpenGL 1.5 Specification.

Overview

    In unextended OpenGL, cube maps are treated as sets of six, independent
    texture images. Once a face is selected from the set, it is treated exactly
    as any other two-dimensional texture would be. When sampling linearly from
    the texture, all of the individual texels that would be used to to create
    the final, bilinear sample values are taken from the same cube face. The
    normal, two-dimensional texture coordinate wrapping modes are honored.
    This sometimes causes seams to appear in cube maps.

    ARB_seamless_cube_map addresses this issue by providing a mechanism whereby
    an implementation could take each of the taps of a bilinear sample from
    a different face, spanning face boundaries and providing seamless filtering
    from cube map textures. However, in ARB_seamless_cube_map, this feature was
    exposed as a global state, affecting all bound cube map textures. It was not
    possible to mix seamless and per-face cube map sampling modes during
    multisampling. Furthermore, if an application included cube maps that were
    meant to be sampled seamlessly and non-seamlessly, it would have to track
    this state and enable or disable seamless cube map sampling as needed.

    This extension addresses this issue and provides an orthogonal method for
    allowing an implementation to provide a per-texture setting for enabling
    seamless sampling from cube maps.

IP Status

    None.

New Procedures and Functions

    None.

New Tokens

    Accepted by the <pname> parameter of TexParameterf, TexParameteri,
    TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv:

    TEXTURE_CUBE_MAP_SEAMLESS                   0x884F (Previously defined in
                                                        ARB_seamless_cubemap)

Additions to Chapter 2 of the 1.5 Specification (OpenGL Operation)

    None.

Additions to Chapter 3 of the 1.5 Specification (Rasterization)

    Section 3.8.4, Texture Parameters, p. 144, append table 3.19 with the
    following:

        Name                               Type     Legal Values
        ------------------------------     -----    --------------------
        TEXTURE_CUBE_MAP_SEAMLESS          boolean  FALSE,
                                                    TRUE

    Section 3.8.4, Texture Parameters, p. 143, append the last paragraph with:

    "The TEXTURE_CUBE_MAP_SEAMLESS parameter is specific to cube maps
     and may be used to control the way that the GL handles sampling from
     coordinates that lie outside the determined cube map face (see section
     3.8.6)."

    Section 3.8.6, Cube Map Texture Selection, p. 145, change the last
    paragraph from

    "This new ( s t ) is used to find a texture value in the determined face's
     two-dimensional texture image using the rules given in sections 3.8.7
     through 3.8.9."

    to:

     "If TEXTURE_CUBE_MAP_SEAMLESS is disabled globally and the value of the
      the texture's TEXTURE_CUBE_MAP_SEAMLESS parameter is FALSE, the new
      ( s t ) is used to find a texture value in the determined face's
      two-dimensional image using the rules given in sections 3.8.7 through
      3.8.9. If TEXTURE_CUBE_MAP_SEAMLESS is emabled globally or the value
      of the texture's TEXTURE_CUBE_MAP_SEAMLESS parameter is TRUE, seamless
      cube map sampling is enabled, and texels are read from adjacent faces as
      described in the ARB_seamless_cube_map extension."

Additions to Chapter 4 of the 1.5 Specification (Per-Fragment Operations
and the Frame Buffer)

    None.

Additions to Chapter 5 of the 1.5 Specification (Special Functions)

    None.

Additions to Chapter 6 of the 1.5 Specification (State and State Requests)

    Section 6.1.3, Enumerated Queries, p. 216, modify the  first paragraph
    on page 216 to read:

    "... For GetTexParameter, value must be either TEXTURE_RESIDENT or one
     of the symbolic values in table 3.19. The TEXTURE_CUBE_MAP_SEAMLESS
     value may only be used when target is TEXTURE_CUBE_MAP. The lod argument
     to GetTexLevelParameter ..."

Additions to the GLX Specification

    None.

Errors

    INVALID_ENUM is generated by TexParameter if <pname> is
    TEXTURE_CUBE_MAP_SEAMLESS and <target> is not TEXTURE_CUBE_MAP.

    INVALID_ENUM is generated by TexParameter if <target> is TEXTURE_CUBE_MAP,
    <pname> is TEXTURE_CUBE_MAP_SEAMLESS and <value> is not either TRUE
    or FALSE.

    INVALID_ENUM is generated by GetTexParameter if <pname> is
    TEXTURE_CUBE_MAP_SEAMLESS and <target> is not TEXTURE_CUBE_MAP.

Dependencies on ARB_seamless_cube_map

    If ARB_seamless_cube_map is not supported, the value of the
    TEXTURE_CUBE_MAP_SEAMLESS token is still used by this extension.
    However, seamless cubemap filtering can only be enabled or disabled on a
    per-texture basis as glEnable and glDisable will not accept
    TEXTURE_CUBE_MAP_SEAMLESS. Even if ARB_seamless_cube_map is not
    supported, the behavior of seamless cube map sampling is as described in
    that extension. The logic to enable seamless filtering will behave as if
    TEXTURE_CUBE_MAP_SEAMLESS were disabled (the default state).

New State

    In table 6.16, Texture Objects, p. 242, add the following:

    Get Value                   Type    Get Command           Init Val      Description                  Sec.   Attribute
    -------------------------   ------  --------------------  --------      --------------------------   ------ ---------
    TEXTURE_CUBE_MAP_SEAMLESS   n x B   GetTexParameter[if]v  FALSE         Seamless cubemap sampling    3.8.6  texture
                                                                                  is enabled.

New Implementation Dependent State

    None.

Issues

    1) How does this extension affect ARB_seamless_cube_map? Which takes
       priority? Explain, in plain English, how seamless filtering gets enabled.

       RESOLVED: These two extensions are orthogonal and neither requires the
       other to function. Seamless filtering is enabled for a cube map texture
       either when TEXTURE_CUBE_MAP_SEAMLESS is enabled globally or when the
       value of the individual texture's TEXTURE_CUBE_MAP_SEAMLESS parameter
       is TRUE. The default for both extensions is to leave cube map sampling as
       described in unextended OpenGL. Thus, an application may use either
       extension and its behavior will be the same, regardless of the presence
       of support for or use of the other.

Revision History

    Rev.    Date    Author    Changes
    ----  --------  --------  -----------------------------------------
     7    02/03/17  Jon Leech Remove ARB suffix from TEXTURE_CUBE_MAP_SEAMLESS
                              (public bug 337).
     6    08/18/09  gsellers  Renamed from AMD_texture_cube_face_select to
                              AMD_seamless_cubemap_per_texture to better follow
                              ARB version.
                              Use ARB token, GL_TRUE and GL_FALSE rather than
                              SAME_FACE and NEXT_FACE.
                              Change type of texture parameter to boolean.
                              Change wording of resolution to issue 1 to reflect
                              the new token names.
     5    05/08/09  gsellers  Large rewrite after splitting global and
                              per-texture support into two extensions.
     4    05/05/09  gsellers  Change token names for consistency. Include
                              interaction with EXT_texture_filter_anisotropic.
     3    04/09/09  gsellers  Fix 'selected' language. Suggest behavior for
                              cases where ( s, t ) lies directly at a cube map
                              corner
     2    04/07/09  gsellers  Minor updates
     1    04/06/09  gsellers  Initial draft
