102f4aeb0Sopenharmony_ciName
202f4aeb0Sopenharmony_ci
302f4aeb0Sopenharmony_ci    NV_depth_nonlinear
402f4aeb0Sopenharmony_ci
502f4aeb0Sopenharmony_ciName Strings
602f4aeb0Sopenharmony_ci
702f4aeb0Sopenharmony_ci    GL_NV_depth_nonlinear
802f4aeb0Sopenharmony_ci    EGL_NV_depth_nonlinear
902f4aeb0Sopenharmony_ci
1002f4aeb0Sopenharmony_ciContact
1102f4aeb0Sopenharmony_ci
1202f4aeb0Sopenharmony_ci    Gary King, NVIDIA Corporation (gking 'at' nvidia.com)
1302f4aeb0Sopenharmony_ci
1402f4aeb0Sopenharmony_ciNotice
1502f4aeb0Sopenharmony_ci
1602f4aeb0Sopenharmony_ci    Copyright NVIDIA Corporation, 2005 - 2007.
1702f4aeb0Sopenharmony_ci
1802f4aeb0Sopenharmony_ciStatus
1902f4aeb0Sopenharmony_ci
2002f4aeb0Sopenharmony_ci    NVIDIA Proprietary
2102f4aeb0Sopenharmony_ci
2202f4aeb0Sopenharmony_ciVersion
2302f4aeb0Sopenharmony_ci
2402f4aeb0Sopenharmony_ci    Last Modified: 2007/03/20
2502f4aeb0Sopenharmony_ci    NVIDIA Revision: 1.0
2602f4aeb0Sopenharmony_ci
2702f4aeb0Sopenharmony_ciNumber
2802f4aeb0Sopenharmony_ci
2902f4aeb0Sopenharmony_ci    EGL Extension #18
3002f4aeb0Sopenharmony_ci    OpenGL ES Extension #73
3102f4aeb0Sopenharmony_ci
3202f4aeb0Sopenharmony_ciDependencies
3302f4aeb0Sopenharmony_ci
3402f4aeb0Sopenharmony_ci    Written based on the wording of the OpenGL 2.0 Specification and
3502f4aeb0Sopenharmony_ci    EGL 1.2 Specification.
3602f4aeb0Sopenharmony_ci
3702f4aeb0Sopenharmony_ci    Requires EGL 1.1.
3802f4aeb0Sopenharmony_ci
3902f4aeb0Sopenharmony_ci    Requires OpenGL-ES 1.0.
4002f4aeb0Sopenharmony_ci
4102f4aeb0Sopenharmony_ci    OES_framebuffer_object affects the wording of this specification.
4202f4aeb0Sopenharmony_ci
4302f4aeb0Sopenharmony_ciOverview
4402f4aeb0Sopenharmony_ci
4502f4aeb0Sopenharmony_ci    Due to the perspective divide, conventional integer Z-buffers have
4602f4aeb0Sopenharmony_ci    a hyperbolic distribution of encodings between the near plane
4702f4aeb0Sopenharmony_ci    and the far plane.  This can result in inaccurate depth testing,
4802f4aeb0Sopenharmony_ci    particularly when the number of depth buffer bits is small
4902f4aeb0Sopenharmony_ci    and objects are rendered near the far plane.
5002f4aeb0Sopenharmony_ci
5102f4aeb0Sopenharmony_ci    Particularly when the number of depth buffer bits is limited
5202f4aeb0Sopenharmony_ci    (desirable and/or required in low-memory environments), artifacts
5302f4aeb0Sopenharmony_ci    due to this loss of precision may occur even with relatively
5402f4aeb0Sopenharmony_ci    modest far plane-to-near plane ratios (e.g., greater than 100:1).
5502f4aeb0Sopenharmony_ci
5602f4aeb0Sopenharmony_ci    Many attempts have been made to provide alternate encodings for
5702f4aeb0Sopenharmony_ci    Z-buffer (or alternate formulations for the stored depth) to
5802f4aeb0Sopenharmony_ci    reduce the artifacts caused by perspective division, such as
5902f4aeb0Sopenharmony_ci    W-buffers, Z-complement buffers and floating-point 1-Z buffers.
6002f4aeb0Sopenharmony_ci
6102f4aeb0Sopenharmony_ci    This extension adds a non-linear encoded Z buffer to OpenGL,
6202f4aeb0Sopenharmony_ci    which can improve the practically useful range of, e.g. 16-bit
6302f4aeb0Sopenharmony_ci    depth buffers by up to a factor of 16, greatly improving depth
6402f4aeb0Sopenharmony_ci    test quality in applications where the ratio between the near
6502f4aeb0Sopenharmony_ci    and far planes can not be as tightly controlled.
6602f4aeb0Sopenharmony_ci
6702f4aeb0Sopenharmony_ciIP Status
6802f4aeb0Sopenharmony_ci
6902f4aeb0Sopenharmony_ci    NVIDIA Proprietary
7002f4aeb0Sopenharmony_ci
7102f4aeb0Sopenharmony_ciNew Procedures and Functions
7202f4aeb0Sopenharmony_ci
7302f4aeb0Sopenharmony_ci    None
7402f4aeb0Sopenharmony_ci
7502f4aeb0Sopenharmony_ciNew Tokens
7602f4aeb0Sopenharmony_ci
7702f4aeb0Sopenharmony_ci    Accepted as a valid sized internal format by all functions accepting
7802f4aeb0Sopenharmony_ci    sized internal formats with a base format of DEPTH_COMPONENT
7902f4aeb0Sopenharmony_ci
8002f4aeb0Sopenharmony_ci        DEPTH_COMPONENT16_NONLINEAR_NV     0x8E2C
8102f4aeb0Sopenharmony_ci
8202f4aeb0Sopenharmony_ci    Accepted by the <attrib_list> parameter of eglChooseConfig and
8302f4aeb0Sopenharmony_ci    eglCreatePbufferSurface, and by the <attribute> parameter of
8402f4aeb0Sopenharmony_ci    eglGetConfigAttrib
8502f4aeb0Sopenharmony_ci
8602f4aeb0Sopenharmony_ci        EGL_DEPTH_ENCODING_NV              0x30E2
8702f4aeb0Sopenharmony_ci
8802f4aeb0Sopenharmony_ci    Accepted as a value in the <attrib_list> parameter of eglChooseConfig
8902f4aeb0Sopenharmony_ci    and eglCreatePbufferSurface, and returned in the <value> parameter
9002f4aeb0Sopenharmony_ci    of eglGetConfigAttrib
9102f4aeb0Sopenharmony_ci
9202f4aeb0Sopenharmony_ci        EGL_DEPTH_ENCODING_NONE_NV         0
9302f4aeb0Sopenharmony_ci        EGL_DEPTH_ENCODING_NONLINEAR_NV    0x30E3
9402f4aeb0Sopenharmony_ci
9502f4aeb0Sopenharmony_ciChanges to the OpenGL 2.0 Specification
9602f4aeb0Sopenharmony_ci
9702f4aeb0Sopenharmony_ci    Add the following line to table 3.16 (p. 154)
9802f4aeb0Sopenharmony_ci
9902f4aeb0Sopenharmony_ci    +--------------------------------+-----------------+------+
10002f4aeb0Sopenharmony_ci    |      Sized Internal Format     |  Base Internal  |  D   |
10102f4aeb0Sopenharmony_ci    |                                |  Format         | Bits |
10202f4aeb0Sopenharmony_ci    +--------------------------------+-----------------+------+
10302f4aeb0Sopenharmony_ci    | DEPTH_COMPONENT16_NONLINEAR_NV | DEPTH_COMPONENT |  16  |
10402f4aeb0Sopenharmony_ci    +--------------------------------+-----------------+------+
10502f4aeb0Sopenharmony_ci
10602f4aeb0Sopenharmony_ciChanges to the EGL 1.2 Specification
10702f4aeb0Sopenharmony_ci
10802f4aeb0Sopenharmony_ci    Add the following line to table 3.1 (p. 14)
10902f4aeb0Sopenharmony_ci
11002f4aeb0Sopenharmony_ci    +--------------------------+------+---------------------------------------+
11102f4aeb0Sopenharmony_ci    |         Attribute        | Type | Notes                                 |
11202f4aeb0Sopenharmony_ci    +--------------------------+------+---------------------------------------+
11302f4aeb0Sopenharmony_ci    |   EGL_DEPTH_ENCODING_NV  | enum | Type of depth-buffer encoding employed|
11402f4aeb0Sopenharmony_ci    +--------------------------+------+---------------------------------------+
11502f4aeb0Sopenharmony_ci
11602f4aeb0Sopenharmony_ci    Modify the description of the depth buffer in Section 3.4 (p. 15)
11702f4aeb0Sopenharmony_ci
11802f4aeb0Sopenharmony_ci    "The depth buffer is used only by OpenGL ES.  It contains fragment depth 
11902f4aeb0Sopenharmony_ci    (Z) information generated during rasterization.  EGL_DEPTH_SIZE indicates 
12002f4aeb0Sopenharmony_ci    the depth of this buffer in bits, and EGL_DEPTH_ENCODING_NV indicates which
12102f4aeb0Sopenharmony_ci    alternate depth-buffer encoding (if any) should be used.  Legal values for
12202f4aeb0Sopenharmony_ci    EGL_DEPTH_ENCODING_NV are: EGL_DONT_CARE, EGL_DEPTH_ENCODING_NONE_NV and
12302f4aeb0Sopenharmony_ci    EGL_DEPTH_ENCODING_NONLINEAR_NV."
12402f4aeb0Sopenharmony_ci
12502f4aeb0Sopenharmony_ci    Add the following line to table 3.4 (p. 20)
12602f4aeb0Sopenharmony_ci
12702f4aeb0Sopenharmony_ci    +-----------------------+---------------+-----------+-------+----------+
12802f4aeb0Sopenharmony_ci    |       Attribute       |     Default   | Selection |  Sort |   Sort   |
12902f4aeb0Sopenharmony_ci    |                       |               |  Criteria | Order | Priority |
13002f4aeb0Sopenharmony_ci    +-----------------------+---------------+-----------+-------+----------+
13102f4aeb0Sopenharmony_ci    | EGL_DEPTH_ENCODING_NV | EGL_DONT_CARE |   Exact   |  None |     -    |
13202f4aeb0Sopenharmony_ci    +-----------------------+---------------+-------------------+----------+
13302f4aeb0Sopenharmony_ci
13402f4aeb0Sopenharmony_ciIssues
13502f4aeb0Sopenharmony_ci
13602f4aeb0Sopenharmony_ci    None
13702f4aeb0Sopenharmony_ci
13802f4aeb0Sopenharmony_ciRevision History
13902f4aeb0Sopenharmony_ci
14002f4aeb0Sopenharmony_ci#1.0 - 20.03.2007
14102f4aeb0Sopenharmony_ci
14202f4aeb0Sopenharmony_ci   Renumbered enumerants.  Reformatted to 80 columns.
143