File: ANGLE_stencil_texturing.txt

package info (click to toggle)
webkit2gtk 2.51.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 457,708 kB
  • sloc: cpp: 3,884,629; javascript: 198,661; ansic: 165,298; python: 49,171; asm: 21,849; ruby: 18,095; perl: 16,914; xml: 4,623; sh: 2,397; yacc: 2,356; java: 2,019; lex: 1,330; pascal: 372; makefile: 197
file content (153 lines) | stat: -rw-r--r-- 5,324 bytes parent folder | download | duplicates (25)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
Name

    ANGLE_stencil_texturing

Name Strings

    GL_ANGLE_stencil_texturing

Contributors

    Contributors to ARB_stencil_texturing
    Members of the WebGL working group

Status

    Draft

Version

    Last Modified Date: March 1, 2023
    Revision: 1

Number

    OpenGL ES Extension XX

Dependencies

    This extension is written against the OpenGL ES 3.0 Specification.

    OpenGL ES 3.0 and OpenGL ES Shading Language 3.00 are required.

Overview

    This extension allows texturing of the stencil component of a packed depth
    stencil texture. Stencil values are returned as unsigned integers. It is
    not possible to sample both depth and stencil values from the same
    texture, and this extension allows the app to select which is sampled for
    the bound texture.

    This extension provides similar functionality to that of OpenGL ES 3.1.

New Procedures and Functions

    None

New Tokens

    Accepted by the <pname> parameter of TexParameter* and GetTexParameter*:

        DEPTH_STENCIL_TEXTURE_MODE_ANGLE                 0x90EA
        STENCIL_INDEX_ANGLE                              0x1901

Additions to the OpenGL ES 3.0 Specification

Changes to Section 3.9.2.1 (Texture Access), page 167

Add a new new bullet point on page 168:

    "* The sampler used in a texture lookup function is one of the shadow
    sampler types, the texture object's internal format is DEPTH_STENCIL,
    and the DEPTH_STENCIL_TEXTURE_MODE_ANGLE is not DEPTH_COMPONENT."

Then change the following paragraph that reads:

    "The stencil texture internal component is ignored if the base internal
    format is DEPTH_STENCIL."

To the following:

    "The stencil index texture internal component is ignored if the base
    internal format is DEPTH_STENCIL and the value of
    DEPTH_STENCIL_TEXTURE_MODE_ANGLE is not STENCIL_INDEX_ANGLE.

    Texture lookups involving texture objects with an internal format
    of DEPTH_STENCIL can read the stencil value as described in section
    3.8 by setting the DEPTH_STENCIL_TEXTURE_MODE_ANGLE to STENCIL_INDEX_ANGLE.
    The stencil value is read as an integer and assigned to R_t. An unsigned
    integer sampler should be used to lookup the stencil component, otherwise
    the results are undefined."

Changes to Section 3.8.7 (Texture Parameters), page 150

In Table 3.20 (Texture parameters and their values) add the following
entry:

    "
    Name                              Type  Legal Values
    -------------                     ----  ------------------------------------
    DEPTH_STENCIL_TEXTURE_MODE_ANGLE  enum  DEPTH_COMPONENT, STENCIL_INDEX_ANGLE
    "

Changes to Section 3.8.12 (Combined Depth/Stencil Textures), page 160

Modify the paragraph to read:

    "If the texture image has a base internal format of DEPTH_STENCIL, then
    the stencil index texture component is ignored by default. The texture
    value <T> does not include a stencil index component, but includes
    only the depth component.

    In order to access the stencil index texture component, the
    DEPTH_STENCIL_TEXTURE_MODE_ANGLE texture parameter should be set to
    STENCIL_INDEX_ANGLE. When this mode is set the depth component is ignored
    and the texture value includes only the stencil index component.
    The stencil index value is treated as an unsigned integer texture and
    returns an unsigned integer value when sampled. When sampling the stencil
    index only NEAREST filtering is supported.
    The DEPTH_STENCIL_TEXTURE_MODE_ANGLE is ignored for non depth/stencil
    textures."

Changes to Section 3.8.13 (Texture Completeness), page 161

Add a new bullet point for the conditions that cause the texture
to not be complete:

    "* The internal format of the texture is DEPTH_STENCIL, the value of
    DEPTH_STENCIL_TEXTURE_MODE_ANGLE for the texture is STENCIL_INDEX_ANGLE,
    and either the magnification filter is not NEAREST or the minification
    filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST."

Changes to Section 3.8.15 (Texture Comparison Modes), page 163

Modify the following paragraph:

    "Let Dt be the depth texture value and St be the stencil index component
    of a depth/stencil texture. If there is no stencil component the value of
    St is undefined. Let Dref be the reference value..."

Insert a new paragraph after the paragraphs that ends:

    "Then the effective texture value is computed as follows:
        If the base internal format is DEPTH_STENCIL and the value of
    DEPTH_STENCIL_TEXTURE_MODE_ANGLE is STENCIL_INDEX_ANGLE, then
            r = St
        Otherwise, if the value of TEXTURE_COMPARE_MODE is NONE, then
            r = Dt
        Otherwise, if the value of TEXTURE_COMPARE_MODE is
    COMPARE_REF_TO_TEXTURE, then r depends on the texture comparison
    function as shown in table 3.23.
        The resulting r is assigned ..."

New State

    (Table 6.9, Textures) add the following entry:

    Get Value                        Type  Get Command        Initial Value    Description                 Section
    -------------------------------- ----  -----------------  ---------------  --------------------------  -------
    DEPTH_STENCIL_TEXTURE_MODE_ANGLE  Z2   GetTexParameteriv  DEPTH_COMPONENT  Depth stencil texture mode  3.8.7

Revision History

    3/1/2023   First revision