1Name 2 3 SGIX_texture_range 4 5Name Strings 6 7 GL_SGIX_texture_range 8 9Version 10 11 $Date: 1999/06/24 02:20:36 $ $Revision: 1.4 $ 12 13Number 14 15 181 16 17Dependencies 18 19 OpenGL 1.2 is required. 20 SGI_color_range is required 21 SGIS_texture4D affects the definition of this extension 22 23Overview 24 25 This extension defines new internal formats for the storage of signed 26 texture images, as well as extended range and precision texture images. 27 28IP Status 29 30 Silicon Graphics has filed for patent protection for some of the 31 techniques described in this extension document. 32 33Issues 34 35 * Should the fact that the numeric type is different create new base 36 formats to better classify this difference? Also this might make 37 sense if there were more than one internal extended-range component 38 resolutions or types in a given system. 39 40 - Yes. New base formats added to spec. 41 42 * Don't want to get extended-range when we don't want it 43 44 - With new base formats, the user explicitly requests extended-range 45 or signed internal formats, either sized or not. 46 47 * TLUT clamping (clamped to [0, 1]) 48 49 - Since the texture color lookup section says that it acts as in 50 section 3.6.3, for color table lookups, and since that section says 51 that the color is first clamped to [0, 1], then everything should be 52 fine. 53 54 * Do we want to make the fact that there are floating-point formats 55 visible at the API level? 56 57 - Not in this spec. In any future spec that defines the 58 floating-point formats and their API, we probably should add a query 59 for exp, mant, sign bits per internal format. 60 61 * Since Bali won't have 4D textures, should we take out references to it 62 in this spec? 63 64 - No. 65 66 * OK to add tokens for formats not supported by Bali, for completeness? 67 68 - Moot point, since we have none. We'll add them as we decide to 69 implement hardware that uses them. 70 71 * Since we're not defining the explicit bit representation of the 72 format, does it still make sense to define sized formats? Or should 73 we wait until the floating-point formats are defined to put out sized 74 enumerants? 75 76 - Keep the sized formats in this spec. 77 78 * It is often assumed in OpenGL that texture values are in the range 79 [0, 1]. For instance, in the detail texture extension, the filtered 80 detail texture color values are scaled by 2 and then have 1 subtracted 81 to generate a number in the [-1, 1] range. What should happen when 82 the texture format can support values in the [-1, 1] range, then? 83 Should the GL still do the scale and bias, or should it just pass the 84 texture value through? 85 86 - Still do the scale and bias. This avoids either a) breaking 87 previous applications by changing their behavior or b) creating 88 hardware that does calculations both with and without the scale and 89 bias. 90 91 * Which of the Section 3.8 alterations should be in this spec, as 92 opposed to the color_range? Which color clamping operations should be 93 based upon the texture internal format, versus the framebuffer format? 94 95 - The color clampings controlled by this spec should be the: 96 a) Clamping of downloaded texture values. 97 b) Clamping of the result of the texture filter operation. 98 99 Both are clampings based upon the texture internal format. All 100 other color clamps are based upon the framebuffer format, including 101 incoming and outgoing colors of the texture environment operation. 102 103 * Texture environment clamping is made stickier with multitexturing. 104 Should the environment function clamp its input values? Its output 105 values? Should it clamp based upon its associated texture's internal 106 format, or based upon the framebuffer format? 107 108 - See above. All incoming colors, fragment color, texture color, 109 etc., and the outgoing color, are clamped based upon the framebuffer 110 format. 111 112 * For queries of the min & max component values, what should be returned 113 if the component doesn't exist in the texture, e.g., MIN_RED_SGIS in 114 an intensity texture or MAX_INTENSITY_SGIS in an RGBA texture. And 115 what about alpha, should it be treated differently since it's implied 116 in non-alpha textures? Should we have the new INTENSITY and LUMINANCE 117 tokens at all, or should we query the red and/or alpha components' min 118 and max values? 119 120 - If a queried component doesn't exist in the format, both the min and 121 max are returned as 0, and no error condition is set. Because of 122 this, we need the INTENSITY and LUMINANCE tokens. 123 124 * What about ALPHA, in textures that don't have it, since it ususally 125 is an implied 1, instead of an implied 0? 126 127 - For now, as above, min & max are returned as 0. Since the user has 128 requested an alpha-free texture format, one would hope they would be 129 smart enought to not then query the available alpha range. One 130 would hope. 131 132New Procedures and Functions 133 134 None 135 136New Tokens 137 138 Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, 139 TexImage3DEXT, TexImage4DSGIS, CopyTexImage1D, and CopyTexImage2D: 140 141 RGB_SIGNED_SGIX 0x85E0 142 RGBA_SIGNED_SGIX 0x85E1 143 ALPHA_SIGNED_SGIX 0x85E2 144 LUMINANCE_SIGNED_SGIX 0x85E3 145 INTENSITY_SIGNED_SGIX 0x85E4 146 LUMINANCE_ALPHA_SIGNED_SGIX 0x85E5 147 RGB16_SIGNED_SGIX 0x85E6 148 RGBA16_SIGNED_SGIX 0x85E7 149 ALPHA16_SIGNED_SGIX 0x85E8 150 LUMINANCE16_SIGNED_SGIX 0x85E9 151 INTENSITY16_SIGNED_SGIX 0x85EA 152 LUMINANCE16_ALPHA16_SIGNED_SGIX 0x85EB 153 RGB_EXTENDED_RANGE_SGIX 0x85EC 154 RGBA_EXTENDED_RANGE_SGIX 0x85ED 155 ALPHA_EXTENDED_RANGE_SGIX 0x85EE 156 LUMINANCE_EXTENDED_RANGE_SGIX 0x85EF 157 INTENSITY_EXTENDED_RANGE_SGIX 0x85F0 158 LUMINANCE_ALPHA_EXTENDED_RANGE_SGIX 0x85F1 159 RGB16_EXTENDED_RANGE_SGIX 0x85F2 160 RGBA16_EXTENDED_RANGE_SGIX 0x85F3 161 ALPHA16_EXTENDED_RANGE_SGIX 0x85F4 162 LUMINANCE16_EXTENDED_RANGE_SGIX 0x85F5 163 INTENSITY16_EXTENDED_RANGE_SGIX 0x85F6 164 LUMINANCE16_ALPHA16_EXTENDED_RANGE_SGIX 0x85F7 165 166 Accepted by the <value> parameter of of GetTexLevelParameterfv and 167 GetTexLevelParameteriv: 168 169 MIN_LUMINANCE_SGIS 0x85F8 170 MAX_LUMINANCE_SGIS 0x85F9 171 MIN_INTENSITY_SGIS 0x85FA 172 MAX_INTENSITY_SGIS 0x85FB 173 174Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation) 175 176 None 177 178Additions to Chapter 3 of the 1.2 Specification (Rasterization) 179 180 The following is added to Section 3.8.1: 181 182 "... just before final conversion. Each R, G, B, and A value so 183 generated is clamped to [min, max]. The minimum is implementation- 184 dependent for extended range and precision internal formats, but at most 185 0. It is -1 for signed internal formats, and is 0 for all other 186 formats. The maximum is implementation-dependent for extended range and 187 precision formats, but is at least 1, and is 1 for all other formats. 188 189 190 The following is added to Table 3.16: 191 192 Sized Base R G B A L I 193 Internal Format Internal Format Bits Bits Bits Bits Bits Bits 194 --------------- ----------------------------------- ---- ---- ---- ---- ---- ---- 195 RGB16_SIGNED_SGIX RGB_SIGNED_SGIX 16 16 16 196 RGBA16_SIGNED_SGIX RGBA_SIGNED_SGIX 16 16 16 16 197 ALPHA16_SIGNED_SGIX ALPHA_SIGNED_SGIX 16 198 LUMINANCE16_SIGNED_SGIX LUMINANCE_SIGNED_SGIX 16 199 INTENSITY16_SIGNED_SGIX INTENSITY_SIGNED_SGIX 16 200 LUMINANCE16_ALPHA16_SIGNED_SGIX LUMINANCE_ALPHA_SIGNED_SGIX 16 16 201 RGB16_EXTENDED_RANGE_SGIX RGB_EXTENDED_RANGE_SGIX 16 16 16 202 RGBA16_EXTENDED_RANGE_SGIX RGBA_EXTENDED_RANGE_SGIX 16 16 16 16 203 ALPHA16_EXTENDED_RANGE_SGIX ALPHA_EXTENDED_RANGE_SGIX 16 204 LUMINANCE16_EXTENDED_RANGE_SGIX LUMINANCE_EXTENDED_RANGE_SGIX 16 205 INTENSITY16_EXTENDED_RANGE_SGIX INTENSITY_EXTENDED_RANGE_SGIX 16 206 LUMINANCE16_ALPHA16_EXTENDED_RANGE_SGIX LUMINANCE_ALPHA_EXTENDED_RANGE_SGIX 16 16 207 208 209 The following is added to Section 3.8.3: 210 211 "... values to floating point. Each of the four values set by 212 TEXTURE_BORDER_COLOR is clamped to lie in [min, max], where min and max 213 are based upon the internal format of the image in level-of-detail 0, as 214 specified in section 3.8.1" 215 216 217Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations 218and the Frame Buffer) 219 220 None 221 222Additions to Chapter 5 of the 1.2 Specification (Special Functions) 223 224 None 225 226Additions to Chapter 6 of the 1.2 Specification (State and State Requests) 227 228 The following is added to Section 6.1.3: 229 230 "...when the image array was defined. Queries of MIN_RED_SGIS, 231 MAX_RED_SGIS, MIN_GREEN_SGIS, MAX_GREEN_SGIS, MIN_BLUE_SGIS, 232 MAX_BLUE_SGIS, MIN_ALPHA_SGIS, MAX_ALPHA_SGIS, MIN_LUMINANCE_SGIS, 233 MAX_LUMINANCE_SGIS, MIN_INTENSITY_SGIS, and MAX_INTENSITY_SGIS 234 return the minimum and maximum expressable values of the internal 235 format of the image. Queries of TEXTURE_WIDTH ..." 236 237Additions to the GLX Specification 238 239 None 240 241Dependencies on SGIS_texture4D 242 243 If SGIS_texture4D is not supported, all references to TexImage4DSGIS, 244 TexSubImage4DSGIS, and CopyTexSubImage4DSGIS are ignored. 245 246Errors 247 248 None 249 250New State 251 252 Get Value Get Command Type Initial Value 253 --------- ----------- ---- ------------- 254 MIN_RED_SGIS GetTexLevelParameterfv R 0.0 255 MAX_RED_SGIS GetTexLevelParameterfv R+ 1.0 256 MIN_GREEN_SGIS GetTexLevelParameterfv R 0.0 257 MAX_GREEN_SGIS GetTexLevelParameterfv R+ 1.0 258 MIN_BLUE_SGIS GetTexLevelParameterfv R 0.0 259 MAX_BLUE_SGIS GetTexLevelParameterfv R+ 1.0 260 MIN_ALPHA_SGIS GetTexLevelParameterfv R 0.0 261 MAX_ALPHA_SGIS GetTexLevelParameterfv R+ 1.0 262 MIN_LUMINANCE_SGIS GetTexLevelParameterfv R 0.0 263 MAX_LUMINANCE_SGIS GetTexLevelParameterfv R+ 1.0 264 MIN_INTENSITY_SGIS GetTexLevelParameterfv R 0.0 265 MAX_INTENSITY_SGIS GetTexLevelParameterfv R+ 1.0 266 267New Implementation Dependent State 268 269 Get Value Get Command Type 270 --------- ----------- ---- 271 TEXTURE_RANGE_SGIX GetBooleanv B 272 273