• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    ATI_texture_env_combine3
4
5Name Strings
6
7    GL_ATI_texture_env_combine3
8
9Contact
10
11    Dan Ginsburg, AMD (dan.ginsburg 'at' amd.com)
12    Evan Hart, NVIDIA (ehart 'at' nvidia.com)
13
14Notice
15
16    Copyright ATI Corporation, 2002.
17
18IP Status
19
20    None.
21
22Version
23
24    Date: 11/04/2006 Revision: 1.02
25
26Number
27
28    None.
29
30Dependencies
31
32    ARB_texture_env_combine is required and is modified by this extension
33    ARB_multitexture affects the definition of this extension
34
35Overview
36
37    Adds new set of operations to the texture combiner operations.
38
39    MODULATE_ADD_ATI               Arg0 * Arg2 + Arg1
40    MODULATE_SIGNED_ADD_ATI        Arg0 * Arg2 + Arg1 - 0.5
41    MODULATE_SUBTRACT_ATI          Arg0 * Arg2 - Arg1
42
43    where Arg0, Arg1 and Arg2 are derived from
44
45        PRIMARY_COLOR_ARB       primary color of incoming fragment
46        TEXTURE                 texture color of corresponding texture unit
47        CONSTANT_ARB            texture environment constant color
48        PREVIOUS_ARB            result of previous texture environment; on
49                                texture unit 0, this maps to PRIMARY_COLOR_ARB
50
51    In addition, the result may be scaled by 1.0, 2.0 or 4.0.
52
53    Note that in addition to providing more flexible equations new source
54    inputs have been added for zero and one.
55
56Issues
57
58    None
59
60New Procedures and Functions
61
62    None
63
64New Tokens
65
66    Accepted by the <params> parameter of TexEnvf, TexEnvi, TexEnvfv,
67    and TexEnviv when the <pname> parameter value is COMBINE_RGB_ARB
68    or COMBINE_ALPHA_ARB
69
70        MODULATE_ADD_ATI                   0x8744
71        MODULATE_SIGNED_ADD_ATI            0x8745
72        MODULATE_SUBTRACT_ATI              0x8746
73
74
75    Accepted by the <params> parameter of TexEnvf, TexEnvi, TexEnvfv,
76    and TexEnviv when the <pname> parameter value is SOURCE0_RGB_ARB,
77    SOURCE1_RGB_ARB, SOURCE2_RGB_ARB, SOURCE0_ALPHA_ARB,
78    SOURCE1_ALPHA_ARB, or SOURCE2_ALPHA_ARB
79
80        ZERO
81        ONE
82
83Additions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation)
84
85    None
86
87Additions to Chapter 3 of the OpenGL 1.2 Specification (Rasterization)
88
89    Added to subsection 3.8.9, before the paragraph describing the
90    state requirements:
91
92    If the value of TEXTURE_ENV_MODE is COMBINE_ARB, the form of the
93    texture function depends on the values of COMBINE_RGB_ARB and
94    COMBINE_ALPHA_ARB, according to table 3.20. The RGB and ALPHA
95    results of the texture function are then multiplied by the values
96    of RGB_SCALE_ARB and ALPHA_SCALE, respectively. The results are
97    clamped to [0,1].
98
99        COMBINE_RGB_ARB         Texture Function
100        ------------------      ----------------
101        REPLACE                 Arg0
102        MODULATE                Arg0 * Arg1
103        ADD                     Arg0 + Arg1
104        SIGNED_ADD_ARB          Arg0 + Arg1 - 0.5
105        INTERPOLATE_ARB         Arg0 * (Arg2) + Arg1 * (1-Arg2)
106        SUBTRACT_ARB            Arg0 - Arg1
107        MODULATE_ADD_ATI        Arg0 * Arg2 + Arg1
108        MODULATE_SIGNED_ADD_ATI Arg0 * Arg2 + Arg1 - 0.5
109        MODULATE_SUBTRACT_ATI   Arg0 * Arg2 - Arg1
110
111
112        COMBINE_ALPHA_ARB       Texture Function
113        ------------------      ----------------
114        REPLACE                 Arg0
115        MODULATE                Arg0 * Arg1
116        ADD                     Arg0 + Arg1
117        SIGNED_ADD_ARB          Arg0 + Arg1 - 0.5
118        INTERPOLATE_ARB         Arg0 * (Arg2) + Arg1 * (1-Arg2)
119        SUBTRACT_ARB            Arg0 - Arg1
120        MODULATE_ADD_ATI        Arg0 * Arg2 + Arg1
121        MODULATE_SIGNED_ADD_ATI Arg0 * Arg2 + Arg1 - 0.5
122        MODULATE_SUBTRACT_ATI   Arg0 * Arg2 - Arg1
123
124    The arguments Arg0, Arg1 and Arg2 are determined by the values of
125    SOURCE<n>_RGB_ARB, SOURCE<n>_ALPHA_ARB, OPERAND<n>_RGB_ARB and
126    OPERAND<n>_ALPHA_ARB. In the following two tables, Ct and At are
127    the filtered texture RGB and alpha values; Cc and Ac are the
128    texture environment RGB and alpha values; Cf and Af are the RGB
129    and alpha of the primary color of the incoming fragment; and Cp
130    and Ap are the RGB and alpha values resulting from the previous
131    texture environment. On texture environment 0, Cp and Ap are
132    identical to Cf and Af, respectively. The relationship is
133    described in tables 3.21 and 3.22.
134
135        SOURCE<n>_RGB_ARB       OPERAND<n>_RGB_ARB      Argument
136        -----------------       --------------          --------
137        TEXTURE                 SRC_COLOR               Ct
138                                ONE_MINUS_SRC_COLOR     (1-Ct)
139                                SRC_ALPHA               At
140                                ONE_MINUS_SRC_ALPHA     (1-At)
141        CONSTANT_ARB            SRC_COLOR               Cc
142                                ONE_MINUS_SRC_COLOR     (1-Cc)
143                                SRC_ALPHA               Ac
144                                ONE_MINUS_SRC_ALPHA     (1-Ac)
145        PRIMARY_COLOR_ARB       SRC_COLOR               Cf
146                                ONE_MINUS_SRC_COLOR     (1-Cf)
147                                SRC_ALPHA               Af
148                                ONE_MINUS_SRC_ALPHA     (1-Af)
149        PREVIOUS_ARB            SRC_COLOR               Cp
150                                ONE_MINUS_SRC_COLOR     (1-Cp)
151                                SRC_ALPHA               Ap
152                                ONE_MINUS_SRC_ALPHA     (1-Ap)
153        ZERO                    SRC_COLOR               0
154                                ONE_MINUS_SRC_COLOR     1
155                                SRC_ALPHA               0
156                                ONE_MINUS_SRC_ALPHA     1
157        ONE                     SRC_COLOR               1
158                                ONE_MINUS_SRC_COLOR     0
159                                SRC_ALPHA               1
160                                ONE_MINUS_SRC_ALPHA     0
161
162
163        Table 3.21: Arguments for COMBINE_RGB_ARB functions
164
165        SOURCE<n>_ALPHA_ARB     OPERAND<n>_ALPHA_ARB    Argument
166        -----------------       --------------          --------
167        TEXTURE                 SRC_ALPHA               At
168                                ONE_MINUS_SRC_ALPHA     (1-At)
169        CONSTANT_ARB            SRC_ALPHA               Ac
170                                ONE_MINUS_SRC_ALPHA     (1-Ac)
171        PRIMARY_COLOR_ARB       SRC_ALPHA               Af
172                                ONE_MINUS_SRC_ALPHA     (1-Af)
173        PREVIOUS_ARB            SRC_ALPHA               Ap
174                                ONE_MINUS_SRC_ALPHA     (1-Ap)
175        ZERO                    SRC_ALPHA               0
176                                ONE_MINUS_SRC_ALPHA     1
177        ONE                     SRC_ALPHA               1
178                                ONE_MINUS_SRC_ALPHA     0
179
180        Table 3.22: Arguments for COMBINE_ALPHA_ARB functions
181
182
183
184Additions to Chapter 4 of the OpenGL 1.2 Specification (Per-Fragment Operations
185and the Framebuffer)
186
187    None
188
189Additions to Chapter 5 of the OpenGL 1.2 Specification (Special Functions)
190
191    None
192
193Additions to Chapter 6 of the OpenGL 1.2 Specification (State and State Requests)
194
195    None
196
197New State
198
199    None
200
201New Implementation Dependent State
202
203    None
204
205Revision History
206
207   Date: 3/29/2010
208   Revision: 1.03
209      - (pbrown @ NVIDIA) Fix the "Name Strings" section to include a "GL"
210        prefix.
211
212   Date: 11/4/2006
213   Revision: 1.02
214      - Updated contact info after ATI/AMD merger.
215
216   Date: 8/02/2002
217   Revision: 1.01
218      - Changed constant MODULATE_ADD_SIGNED_ATI to MODULATE_SIGNED_ADD_ATI.
219
220   Date: 8/01/2002
221   Revision: 1.0
222      - First release based on ATIX version.
223