• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    EXT_texture_perturb_normal
4
5Name Strings
6
7    GL_EXT_texture_perturb_normal
8
9Version
10
11    $Date: 1999/07/29 23:28:10 $
12
13Number
14
15    147
16
17Dependencies
18
19    OpenGL 1.1 is required.
20    EXT_coordinate_frame is required.
21    EXT_light_texture is required.
22    The language is written against the OpenGL 1.2 specification.
23
24Overview
25
26    This extension defines a mechanism for using texture values to perturb
27    the fragment normal vector prior to fragment lighting.  It enables a
28    direct implementation of the original formulation of bump mapping by
29    Blinn.
30
31Patent Note
32
33    To the extent that SGI has patent rights that are unavoidably
34    infringed by all implementations of this extension, SGI will, upon
35    request, grant a license under such patent rights to the requesting
36    party subject to reasonable terms and conditions, and without
37    incremental charge or fee. Such license shall be non-exclusive, and
38    non-transferable, and shall be limited to implementations of the
39    extension in combination with any conformance certified
40    implementation of the OpenGL API. Such license is expressly
41    contingent upon a grant back of a non-exclusive, royalty-free,
42    perpetual, worldwide license to SGI and its OpenGL licensees under
43    the requesting party's patent rights that are unavoidably infringed
44    by all implementations of this extension or OpenGL.
45
46Issues
47
48    *  do we need to specify how evaluators compute the tangent and binormal
49       in a way different than the EXT_coordinate_frame spec does?
50
51    *  TextureLightEXT effectively defines a set of orthogonal binding
52       points.  TextureNormalEXT defines modes for how the NORMAL binding
53       works, either as a perturbation or a straight replacement.  An
54       alternate way to define TextureNormalEXT which might be more
55       symmetric is to allow it to define two binding points: the
56       base normal and the perturbation and allow binding to either.
57       If no texture is bound to the perturbation, it is treated as
58       zero.  A disadvantage is that it provides generality that may be
59       unwarranted such as the ability to bind one texture to the base
60       and another texture to the perturbation.  Which way should we
61       do this?
62
63    *  the naming scheme doesn't seem consistent.  light_texture.spec
64       defines TextureLightEXT and the extension name EXT_light_texture.
65       texture_perturb_normal.spec defines TextureNormalEXT and the extension
66       name EXT_texture_perturb_normal.  Perhaps light_texture should be
67       renamed EXT_texture_light or rename this one?
68
69New Procedures and Functions
70
71    void TextureNormalEXT(enum mode)
72
73New Tokens
74
75    Accepted by the <mode> parameter of TextureNormalEXT:
76
77    PERTURB_EXT                         0x85AE
78
79    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
80    and GetDoublev:
81
82    TEXTURE_NORMAL_EXT                  0x85AF
83
84Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation)
85
86    None
87
88Additions to Chapter 3 of the 1.2 Specification (Rasterization)
89
90    The command
91
92    TextureNormalEXT(enum mode)
93
94    determines how the fragment normal vector is modified by the post-
95    texture-environment color when the texture application mode is
96    FRAGMENT_NORMAL_EXT.  <mode> is one of REPLACE or PERTURB_EXT.
97
98    If <mode> is REPLACE, then the R, G, and B components of the
99    post-texture-environment color replace the normal for the fragment,
100    as defined in the light_texture specification.  This is the default
101    behavior.
102
103    If <mode> is PERTURB_EXT, then the R and A components of the
104    post-texture-environment color are used, along with the tangent and
105    binormal vectors of the fragment, to perturb the normal vector of the
106    fragment.  The tangent vector for the fragment is multiplied by the
107    range-shifted R component (2*R-1) of the post-texture-environment
108    color, and the binormal vector for the fragment is multiplied by the
109    range-shifted A component (2*A-1) of the post-texture-environment
110    color.  The vectors thus obtained are added to the normal for the
111    fragment and the resultant vector is normalized. This normalized
112    resultant vector replaces the normal for the fragment.
113
114Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations
115and the Framebuffer)
116
117Additions to Chapter 5 of the 1.2 Specification (Special Functions)
118
119Additions to Chapter 6 of the 1.2 Specification (State and State Requests)
120
121    The texture normal mode is queried using GetBooleanv, GetIntegerv,
122    GetFloatv, and GetDoublev with the <pname> parameter set to
123    TEXTURE_NORMAL_EXT.
124
125Additions to the GLX Specification
126
127    None
128
129GLX Protocol
130
131    TBD
132
133Dependencies on EXT_coordinate_frame
134
135    EXT_coordinate_frame is required since this extension requires
136    the tangent and binormal to perturb the normal vector and this
137    extension makes no sense without the tangent and binormal.
138
139Dependencies on EXT_light_texture
140
141    EXT_light_texture is required since this extension pertains to how
142    textures are used in the fragment lighting computations and makes
143    no sense without light texture.
144
145Errors
146
147    INVALID_ENUM is generated if TextureNormalEXT parameter <pname> is
148    not REPLACE or PERTURB_EXT.
149
150    INVALID_OPERATION is generated if TextureNormalEXT is executed between
151    execution of Begin and the corresponding execution of End.
152
153New State
154
155    Get Value           Get Command     Type    Initial Value       Attribute
156    ---------           -----------     ----    -------------       ---------
157    TEXTURE_NORMAL_EXT  GetIntegerv     Z2      REPLACE             texture
158
159New Implementation Dependent State
160
161    None
162