15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    EXT_texture_perturb_normal
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_EXT_texture_perturb_normal
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciVersion
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    $Date: 1999/07/29 23:28:10 $
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNumber
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    147
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciDependencies
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    OpenGL 1.1 is required.
205bd8deadSopenharmony_ci    EXT_coordinate_frame is required.
215bd8deadSopenharmony_ci    EXT_light_texture is required.
225bd8deadSopenharmony_ci    The language is written against the OpenGL 1.2 specification.
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ciOverview
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ci    This extension defines a mechanism for using texture values to perturb
275bd8deadSopenharmony_ci    the fragment normal vector prior to fragment lighting.  It enables a
285bd8deadSopenharmony_ci    direct implementation of the original formulation of bump mapping by
295bd8deadSopenharmony_ci    Blinn.
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ciPatent Note
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ci    To the extent that SGI has patent rights that are unavoidably
345bd8deadSopenharmony_ci    infringed by all implementations of this extension, SGI will, upon
355bd8deadSopenharmony_ci    request, grant a license under such patent rights to the requesting
365bd8deadSopenharmony_ci    party subject to reasonable terms and conditions, and without
375bd8deadSopenharmony_ci    incremental charge or fee. Such license shall be non-exclusive, and
385bd8deadSopenharmony_ci    non-transferable, and shall be limited to implementations of the
395bd8deadSopenharmony_ci    extension in combination with any conformance certified
405bd8deadSopenharmony_ci    implementation of the OpenGL API. Such license is expressly
415bd8deadSopenharmony_ci    contingent upon a grant back of a non-exclusive, royalty-free,
425bd8deadSopenharmony_ci    perpetual, worldwide license to SGI and its OpenGL licensees under
435bd8deadSopenharmony_ci    the requesting party's patent rights that are unavoidably infringed
445bd8deadSopenharmony_ci    by all implementations of this extension or OpenGL.
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ciIssues
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ci    *  do we need to specify how evaluators compute the tangent and binormal
495bd8deadSopenharmony_ci       in a way different than the EXT_coordinate_frame spec does?
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    *  TextureLightEXT effectively defines a set of orthogonal binding
525bd8deadSopenharmony_ci       points.  TextureNormalEXT defines modes for how the NORMAL binding
535bd8deadSopenharmony_ci       works, either as a perturbation or a straight replacement.  An
545bd8deadSopenharmony_ci       alternate way to define TextureNormalEXT which might be more
555bd8deadSopenharmony_ci       symmetric is to allow it to define two binding points: the
565bd8deadSopenharmony_ci       base normal and the perturbation and allow binding to either.
575bd8deadSopenharmony_ci       If no texture is bound to the perturbation, it is treated as
585bd8deadSopenharmony_ci       zero.  A disadvantage is that it provides generality that may be
595bd8deadSopenharmony_ci       unwarranted such as the ability to bind one texture to the base
605bd8deadSopenharmony_ci       and another texture to the perturbation.  Which way should we
615bd8deadSopenharmony_ci       do this?
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci    *  the naming scheme doesn't seem consistent.  light_texture.spec
645bd8deadSopenharmony_ci       defines TextureLightEXT and the extension name EXT_light_texture.
655bd8deadSopenharmony_ci       texture_perturb_normal.spec defines TextureNormalEXT and the extension
665bd8deadSopenharmony_ci       name EXT_texture_perturb_normal.  Perhaps light_texture should be
675bd8deadSopenharmony_ci       renamed EXT_texture_light or rename this one?
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ciNew Procedures and Functions
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci    void TextureNormalEXT(enum mode)
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ciNew Tokens
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci    Accepted by the <mode> parameter of TextureNormalEXT:
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci    PERTURB_EXT                         0x85AE
785bd8deadSopenharmony_ci
795bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
805bd8deadSopenharmony_ci    and GetDoublev:
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci    TEXTURE_NORMAL_EXT                  0x85AF
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2 Specification (OpenGL Operation)
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ci    None
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2 Specification (Rasterization)
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci    The command
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ci    TextureNormalEXT(enum mode)
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci    determines how the fragment normal vector is modified by the post-
955bd8deadSopenharmony_ci    texture-environment color when the texture application mode is
965bd8deadSopenharmony_ci    FRAGMENT_NORMAL_EXT.  <mode> is one of REPLACE or PERTURB_EXT.
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ci    If <mode> is REPLACE, then the R, G, and B components of the
995bd8deadSopenharmony_ci    post-texture-environment color replace the normal for the fragment,
1005bd8deadSopenharmony_ci    as defined in the light_texture specification.  This is the default
1015bd8deadSopenharmony_ci    behavior.
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci    If <mode> is PERTURB_EXT, then the R and A components of the
1045bd8deadSopenharmony_ci    post-texture-environment color are used, along with the tangent and
1055bd8deadSopenharmony_ci    binormal vectors of the fragment, to perturb the normal vector of the
1065bd8deadSopenharmony_ci    fragment.  The tangent vector for the fragment is multiplied by the
1075bd8deadSopenharmony_ci    range-shifted R component (2*R-1) of the post-texture-environment
1085bd8deadSopenharmony_ci    color, and the binormal vector for the fragment is multiplied by the
1095bd8deadSopenharmony_ci    range-shifted A component (2*A-1) of the post-texture-environment
1105bd8deadSopenharmony_ci    color.  The vectors thus obtained are added to the normal for the
1115bd8deadSopenharmony_ci    fragment and the resultant vector is normalized. This normalized
1125bd8deadSopenharmony_ci    resultant vector replaces the normal for the fragment.
1135bd8deadSopenharmony_ci
1145bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations
1155bd8deadSopenharmony_ciand the Framebuffer)
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 Specification (Special Functions)
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 Specification (State and State Requests)
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci    The texture normal mode is queried using GetBooleanv, GetIntegerv,
1225bd8deadSopenharmony_ci    GetFloatv, and GetDoublev with the <pname> parameter set to
1235bd8deadSopenharmony_ci    TEXTURE_NORMAL_EXT.
1245bd8deadSopenharmony_ci
1255bd8deadSopenharmony_ciAdditions to the GLX Specification
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci    None
1285bd8deadSopenharmony_ci
1295bd8deadSopenharmony_ciGLX Protocol
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci    TBD
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ciDependencies on EXT_coordinate_frame
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ci    EXT_coordinate_frame is required since this extension requires
1365bd8deadSopenharmony_ci    the tangent and binormal to perturb the normal vector and this
1375bd8deadSopenharmony_ci    extension makes no sense without the tangent and binormal.
1385bd8deadSopenharmony_ci
1395bd8deadSopenharmony_ciDependencies on EXT_light_texture
1405bd8deadSopenharmony_ci
1415bd8deadSopenharmony_ci    EXT_light_texture is required since this extension pertains to how
1425bd8deadSopenharmony_ci    textures are used in the fragment lighting computations and makes
1435bd8deadSopenharmony_ci    no sense without light texture.
1445bd8deadSopenharmony_ci
1455bd8deadSopenharmony_ciErrors
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ci    INVALID_ENUM is generated if TextureNormalEXT parameter <pname> is
1485bd8deadSopenharmony_ci    not REPLACE or PERTURB_EXT.
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci    INVALID_OPERATION is generated if TextureNormalEXT is executed between
1515bd8deadSopenharmony_ci    execution of Begin and the corresponding execution of End.
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ciNew State
1545bd8deadSopenharmony_ci
1555bd8deadSopenharmony_ci    Get Value           Get Command     Type    Initial Value       Attribute
1565bd8deadSopenharmony_ci    ---------           -----------     ----    -------------       ---------
1575bd8deadSopenharmony_ci    TEXTURE_NORMAL_EXT  GetIntegerv     Z2      REPLACE             texture
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ciNew Implementation Dependent State
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ci    None
162