1Name 2 3 NV_float_buffer 4 5Name Strings 6 7 GL_NV_float_buffer 8 WGL_NV_float_buffer 9 GLX_NV_float_buffer 10 11Contact 12 13 Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com) 14 15Notice 16 17 Copyright NVIDIA Corporation. 18 19IP Status 20 21 NVIDIA Proprietary. 22 23Status 24 25 Implemented in CineFX (NV30) Emulation driver, August 2002. 26 Shipping in Release 40 NVIDIA driver for CineFX hardware, January 2003. 27 28 Superseded by the more general ARB_texture_float and 29 ARB_color_buffer_float extensions. However, NV3x-based GPUs are not 30 capable enough to support the generality of the ARB extensions so 31 the NV_float_buffer extension remains available for NV3x development 32 and backward compatibility. 33 34Version 35 36 Last Modified: 2006/11/03 37 NVIDIA Revision: 20 38 39Number 40 41 281 42 43Dependencies 44 45 Written based on the wording of the OpenGL 1.3 specification and the 46 WGL_ARB_pixel_format extension specification. 47 48 The following extensions are required: 49 * NV_fragment_program 50 * NV_texture_rectangle 51 * WGL_ARB_pixel_format 52 * WGL_ARB_render_texture 53 * WGL_NV_render_texture_rectangle 54 55 EXT_paletted_texture trivially affects the definition of this extension. 56 57 SGIX_depth_texture trivially affects the definition of this extension. 58 59 NV_texture_shader trivially affects the definition of this extension. 60 61 NV_half_float trivially affects the definition of this extension. 62 63 ARB_color_buffer_float and ATI_pixel_format_float affect the definition of 64 this extension. 65 66 ARB_texture_float and ATI_texture_float affect the definition of this 67 extension. 68 69 This extension modifies EXT_framebuffer_object. 70 71Overview 72 73 This extension builds upon NV_fragment_program to provide a framebuffer 74 and texture format that allows fragment programs to read and write 75 unconstrained floating point data. 76 77 In unextended OpenGL, most computations dealing with color or depth 78 buffers are typically constrained to operate on values in the range [0,1]. 79 Computational results are also typically clamped to the range [0,1]. 80 Color, texture, and depth buffers themselves also hold values mapped to 81 the range [0,1]. 82 83 The NV_fragment_program extension provides a general computational model 84 that supports floating-point numbers constrained only by the precision of 85 the underlying data types. The quantites computed by fragment programs do 86 not necessarily correspond in number or in range to conventional 87 attributes such as RGBA colors or depth values. Because of the range and 88 precision constraints imposed by conventional fixed-point color buffers, 89 it may be difficult (if not impossible) to use them to implement certain 90 multi-pass algorithms. 91 92 To enhance the extended range and precision available through fragment 93 programs, this extension provides floating-point RGBA color buffers that 94 can be used instead of conventional fixed-point RGBA color buffers. A 95 floating-point RGBA color buffer consists of one to four floating-point 96 components stored in the 16- or 32-bit floating-point formats (fp16 or 97 fp32) defined in the NV_half_float and NV_fragment_program extensions. 98 99 When a floating-point color buffer is used, the results of fragment 100 programs, as written to the "x", "y", "z", and "w" components of the 101 o[COLR] or o[COLH] output registers, are written directly to the color 102 buffer without any clamping or modification. Certain per-fragment 103 operations are bypassed when rendering to floating-point color buffers. 104 105 A floating-point color buffer can also be used as a texture map, either by 106 reading back the contents and then using conventional TexImage calls, or 107 by using the buffer directly via the ARB_render_texture extension or 108 the EXT_framebuffer_object extension. 109 110 This extension has many uses. Some possible uses include: 111 112 (1) Multi-pass algorithms with arbitrary intermediate results that 113 don't have to be artifically forced into the range [0,1]. In 114 addition, intermediate results can be written without having to 115 worry about out-of-range values. 116 117 (2) Deferred shading algorithms where an expensive fragment program is 118 executed only after depth testing is fully complete. Instead, a 119 simple program is executed, which stores the parameters necessary 120 to produce a final result. After the entire scene is rendered, a 121 second pass is executed over the entire frame buffer to execute 122 the complex fragment program using the results written to the 123 floating-point color buffer in the first pass. This will save the 124 cost of applying complex fragment programs to fragments that will 125 not appear in the final image. 126 127 (3) Use floating-point texture maps to evaluate functions with 128 arbitrary ranges. Arbitrary functions with a finite domain can be 129 approximated using a texture map holding sample results and 130 piecewise linear approximation. 131 132 There are several significant limitations on the use of floating-point 133 color buffers. First, floating-point color buffers do not support frame 134 buffer blending. Second, floating-point texture maps do not support 135 mipmapping or any texture filtering other than NEAREST. Third, 136 floating-point texture maps must be 2D, and must use the 137 NV_texture_rectangle extension. 138 139Issues 140 141 Should the extension create a separate non-RGBA pixel formats or simply 142 extend existing RGBA formats? 143 144 RESOLVED: Extend existing RGBA formats. Since fragment programs 145 generally build on RGBA semantics, it's cleaner to avoid creating a 146 separate "XYZW" mode. There are several special semantics that need 147 to be added: clear color state is now not clamped, and ReadPixels 148 will clamp to [0,1] only if the source data comes from fixed-point 149 color buffers. 150 151 Fragment programs can be written that store data completely unrelated 152 to color into a floating-point "RGBA" buffer. 153 154 Can floating-point color buffers be displayed? If so, how? 155 156 RESOLVED: Not in this extension. Floating-point color buffers can be 157 used only as pbuffers. Hardware necessary to display floating-point 158 color buffers would be expensive and consume significant memory 159 bandwidth. 160 161 Is it possible to encode more than four distinct values in a 162 floating-point color buffer? 163 164 RESOLVED: Yes. The NV_fragment_program extension contains pack and 165 unpack instructions (PK2H, PK2US, PK4B, PK4UB, PK4UBG, UP2H, UP2US, 166 UP4B, UP4UB, UP4UBG) that allow fragment programs to encode multiple 167 values into a single 32-bit component. In particular, it is possible 168 to pack two half-precision floats, two normalized unsigned shorts, or 169 four normalized signed or unsigned bytes into a single 32-bit 170 component. 171 172 A program can use a pack instruction to pack multiple values into a 173 single 32-bit component and then write the resulting component to a 174 floating-point color buffer with 32-bit components. On a subsequent 175 rendering pass, a program can read back the stored data (using texture 176 mapping) and use the equivalent unpack instruction to restore the 177 original values. The only data lost in this process comes from the 178 loss of precision or clamping in the packing operation, where the 179 original values are converted to data types with lower precision or a 180 smaller data range. 181 182 What happens when rendering to a floating-point color buffer if fragment 183 program mode is disabled? Or when fragment program mode is enabled, but 184 no program is loaded? 185 186 RESOLVED: Fragment programs are required to use floating-point color 187 buffers. An INVALID_OPERATION error is generated by any GL command 188 that generates fragments if FRAGMENT_PROGRAM_NV is disabled. The same 189 behavior already exists for conventional frame buffers if 190 FRAGMENT_PROGRAM_NV is enabled but the bound fragment program is 191 invalid. 192 193 Should alpha test be supported with floating-point color buffers? 194 195 RESOLVED: No. It is trivial to implement an alpha test in a fragment 196 program using the KIL instruction, which requires no dedicated frame 197 buffer logic. 198 199 Should blending be supported with floating-point color buffers? 200 201 RESOLVED: Not in this extension. While blending would clearly be 202 useful, full-precision floating-point blenders are expensive. In 203 addition, a computational model more general than traditional blending 204 (with its 1-x operations and clamping) is desirable. The traditional 205 OpenGL blending model would not be the most suitable computational 206 model for future blend-enabled floating-point color buffers. 207 208 An alternative to conventional blending (operating at a coarser 209 granularity) is to (1) render a pass into the color buffer, (2) bind 210 the color buffer as a texture rectangle using this extension and 211 ARB_render_texture, (3) perform texture lookups in a fragment program 212 using the TEX instruction with f[WPOS].xy as a 2D texture coordinate, 213 and (4) perform the necessary blending between the passes using the 214 same fragment program. 215 216 Should we provide accumulation buffers for pixel formats with 217 floating-point color buffers? 218 219 RESOLVED: No. Accumulation operations contents can be achieved using 220 fragment programs to perform the accumulation, which requires no 221 dedicated frame buffer logic. 222 223 Should fragment program color results be converted to match the format of 224 the frame buffer, or should an error result? For example, what if we 225 write to o[COLR] but have a 16-bit frame buffer? 226 227 RESOLVED: Conversions can be performed simply in hardware, so no 228 error semantics are required. This mechanism also allows the same 229 programs to be shared between contexts with different pixel formats. 230 231 Applications should be aware that if color components contain packed 232 data, a data type mismatch may result in a floating-point data 233 conversion that corrupts the packed data. 234 235 How should floating-point color buffers interact with multisampling? For 236 normal color buffers, the multiple samples for each pixel are required to 237 be filtered down to a single pixel in the color buffer. Similar filtering 238 on floating-point color buffers does not necessarily make sense. Should 239 there even be a normal color buffer in this case? 240 241 RESOLVED: The initial implementation of this extension does not 242 provide floating-point color buffers that support multisampling. 243 244 Multisample fragment operations (e.g., SAMPLE_COVERAGE) are explicitly 245 not supported by extension. This extension does not modify the 246 portion of the spec where multiple samples are resolved to a single 247 color value. So if floating-point color buffers were provided, the 248 multiple samples are filtered down to a single result value, most 249 likely by computing a per-component average value. 250 251 Conventional RGBA primitive antialiasing multiplies coverage by the alpha 252 component of the fragment's color, with the assumption that alpha blending 253 will be performed. How does antialiasing work with floating-point color 254 buffers? 255 256 RESOLVED: It doesn't. The computed coverage is not accessible to 257 fragment programs and is discarded. Note also that conventional 258 antialiasing requires alpha blending, which does not work for 259 floating-point color buffers. 260 261 What are the semantics for ReadPixels when using a floating-point color 262 buffer? 263 264 RESOLVED: ReadPixels from a floating-point color buffer works like 265 any other RGBA read, except that the final results are not clamped to 266 the range [0,1]. This ensures that we can save and restore 267 floating-point color buffers using ReadPixels/DrawPixels. 268 269 What are the semantics for Bitmap when using a floating-point color 270 buffer? 271 272 RESOLVED: Bitmap generates fragments using the current raster 273 attributes, which are then passed to fragment programs like any other 274 fragments. Bitmaps will be drawn using the color of the current 275 raster position, whose components are clamped to [0,1] when the raster 276 position is sent. 277 278 What are the semantics for DrawPixels when using a floating-point color 279 buffer? How about CopyPixels? 280 281 RESOLVED: DrawPixels generates fragments with the originally 282 specified color values; components are not clamped to [0,1]. For 283 fixed-point color buffers, DrawPixels will generate fragments with 284 clamped color components. 285 286 CopyPixels is defined in the spec as a ReadPixels followed by a 287 DrawPixels, and will operate similarly. 288 289 This mechanism allows applications to write floating-point data 290 directly into a floating-point color buffer without any clamping. 291 Since DrawPixels and CopyPixels generate fragments and fragment 292 programs are required to render to floating-point color buffers, a 293 fragment program is still required to load a floating-point color 294 buffer using DrawPixels. 295 296 What are the semantics for Clear when using a floating-point color 297 buffer? 298 299 RESOLVED: Clears work as normal, except that values outside the range 300 [0,1] can be written to the color buffer. The core spec is modified 301 so that clear color values are not clamped to [0,1]. Instead, for 302 fixed-point color buffers, clear colors are clamped to [0,1] at clear 303 time. 304 305 For compatibility with conventional OpenGL, queries of 306 CLEAR_COLOR_VALUE will clamp components to [0,1]. A separate 307 FLOAT_CLEAR_COLOR_VALUE_NV query is added to query unclamped color 308 clear values. 309 310 Why don't floating-point textures support filtering? What can be done to 311 achieve texture filtering? 312 313 RESOLVED: Extended OpenGL texture filtering (including mipmapping and 314 support for anisotropic filters) is very computationally expensive. 315 Even simple linear filtering for floating-point textures with large 316 components is expensive. 317 318 Linear filters can be implemented in fragment programs by doing 319 multiple lookups into the same texture. Since fragment programs allow 320 the use of arbitrary coordinates into arbitrary texture maps, this 321 type of operation can be easily done. 322 323 A 1D linear filter can be implemented using an nx1 texture rectangle 324 with the following (untested) fragment program, assuming the 1D 325 coordinate is in f[TEX0].x: 326 327 ADDR H2.xy, f[TEX0].x, {0.0, 1.0}; 328 FRCH H3.x, R1.x; # compute the blend factor 329 TEX H0, H2.x, TEX0, RECT; # lookup 1st sample 330 TEX H1, H2.y, TEX0, RECT; # lookup 2nd sample 331 LRPH H0, H3.x, H1, H0; # blend 332 333 A 2D linear filter can be implemented similarly, assuming the 2D 334 coordinate is in f[TEX0].xy: 335 336 ADDH H2, f[TEX0].xyxy, {0.0, 0.0, 1.0, 1.0}; 337 FRCH H3.xy, H2.xyxy; # base weights 338 ADDH H3.zw, 1.0, -H3.xyxy; # 1-base weights 339 MULH H3, H3.xzxz, H3.yyww; # bilinear filter weights 340 TEX H1, R2.xyxy, TEX0, RECT; # lookup 1st sample 341 MULH H0, H1, H3.x; # blend 342 TEX H1, R2.zyzy, TEX0, RECT; # lookup 2nd sample 343 MADH H0, H1, H3.y, H0; # blend 344 TEX H0, R2.xwxw, TEX0, RECT; # lookup 3rd sample 345 MADH H0, H1, H3.z, H0; # blend 346 TEX H1, R2.zwzw, TEX0, RECT; # lookup 4th sample 347 MADH H0, H1, H3.w, H0; # blend 348 349 Fragment programs can be used to perform more-or-less arbitrary 350 filtering using similar methods, and the DDX and DDY instructions can 351 be used to refine the shape of the filter. 352 353 Why must the NV_texture_rectangle extension be used in order to use 354 floating-point texture maps? 355 356 RESOLVED: On many graphics hardware platforms, texture maps are 357 stored using a special memory encodings designed to optimize rendering 358 performance. In current hardware, conventional texture maps usually 359 top out at 32 bits per texel. The logic required to encode and decode 360 128-bit texels (and frame buffer pixels) optimally is substantially 361 more complex. 362 363 What happens if you try to use a floating-point texture without a 364 fragment program? 365 366 RESOLVED: No error is generated, but that texture is effectively 367 disabled. This is similar to the behavior if an application tried to 368 use a normal texture having an inconsistent set of mipmaps. 369 370 How does NV_float_buffer interact with the OpenGL 1.2 imaging subset? 371 372 RESOLVED: The imaging subset as specified should work properly with 373 floating-point color buffers, but is not modified by this extension. 374 There are imaging operations (e.g., color tables, histograms) that 375 expect the components they operate on to be in the range [0,1], and 376 this extension makes no attempt to extend such functionality. 377 378 How does NV_float_buffer interact with SGIS_generate_mipmap? 379 380 RESOLVED: Since this extension supports only texture rectangles 381 (which have no mipmaps), this issue is moot. 382 383 In the general case, mipmaps should be generated using an appropriate 384 downsample filter, where floating-point component values are averaged. 385 Components should not be clamped during any such mipmap generation. 386 387 What is the deal with the names of the clear color query tokens? 388 389 RESOLVED: The "normal" OpenGL clear color (clamped to [0,1]) is 390 queried using the token COLOR_CLEAR_VALUE. This extension provides a 391 new query for unclamped values, using the token 392 FLOAT_CLEAR_COLOR_VALUE_NV. Notice that "CLEAR" and "COLOR" are 393 reversed due to a mistake made when the spec was first written. This 394 spec lists the core query token, and originally had "CLEAR" and 395 "COLOR" reversed there, too. 396 397 Then again, the core specification is inconsistent since the queried 398 state is set by calling glClearColor(), with "Clear" before "Color". 399 400 What performance issues exist with this functionality? 401 402 See the "NV3x Implementation Issues" section of the 403 specification. 404 405 How should the texture border color (values) be handled for float 406 textures? 407 408 RESOLVED: Clamp the texture border color (values) to [0,1] 409 when sampling a float texture's border. In core OpenGL 1.0, the 410 texture border color components are clamped to the range [01,]. 411 The NV_texture_shader extension added support for signed texture 412 components. We decided to provide GL_TEXTURE_BORDER_VALUES as 413 a way of specifying a version of the texture border color whose 414 components were not clamped to [0,1] when set. This was to 415 provide a way of specifying negative texture border components. 416 417 In practice, that has not proven particularly useful. No real 418 applications are known to have specified negative texture border 419 values components. 420 421 Ideally, the unclamped GL_TEXTURE_BORDER_VALUES state could 422 provide an unclamped (unmassaged) set of floating-point color 423 components for the texture border color. This requires an 424 additional 96 bits of state per texture unit to support this, 425 and based on the experience with NV_texture_shader's support for 426 texture border values outside the [0,1] range, it is simply not 427 worth it. 428 429 For compatibility with the NV_texture_shader extension, we 430 provide language saying that floating-point textures clamp 431 the components of the TEXTURE_BORDER_VALUES vector [0,1] when 432 sampling the border color. 433 434 435New Procedures and Functions 436 437 None. 438 439New Tokens 440 441 Accepted by the <internalformat> parameter of TexImage2D and 442 CopyTexImage2D: 443 444 FLOAT_R_NV 0x8880 445 FLOAT_RG_NV 0x8881 446 FLOAT_RGB_NV 0x8882 447 FLOAT_RGBA_NV 0x8883 448 FLOAT_R16_NV 0x8884 449 FLOAT_R32_NV 0x8885 450 FLOAT_RG16_NV 0x8886 451 FLOAT_RG32_NV 0x8887 452 FLOAT_RGB16_NV 0x8888 453 FLOAT_RGB32_NV 0x8889 454 FLOAT_RGBA16_NV 0x888A 455 FLOAT_RGBA32_NV 0x888B 456 457 Accepted by the <pname> parameter of GetTexLevelParameterfv and 458 GetTexLevelParameteriv: 459 460 TEXTURE_FLOAT_COMPONENTS_NV 0x888C 461 462 Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, 463 and GetDoublev: 464 465 FLOAT_CLEAR_COLOR_VALUE_NV 0x888D 466 FLOAT_RGBA_MODE_NV 0x888E 467 468 Accepted in the <piAttributes> array of wglGetPixelFormatAttribivARB and 469 wglGetPixelFormatAttribfvARB and in the <piAttribIList> and 470 <pfAttribFList> arrays of wglChoosePixelFormatARB: 471 472 WGL_FLOAT_COMPONENTS_NV 0x20B0 473 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 474 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 475 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 476 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 477 478 Accepted in the <piAttribIList> array of wglCreatePbufferARB and returned 479 in the <value> parameter of wglQueryPbufferARB when <iAttribute> is 480 WGL_TEXTURE_FORMAT_ARB: 481 482 WGL_TEXTURE_FLOAT_R_NV 0x20B5 483 WGL_TEXTURE_FLOAT_RG_NV 0x20B6 484 WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 485 WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 486 487 Accepted in the <value> array of glXGetFBConfigAttrib (and 488 glXGetFBConfigAttribSGIX): 489 490 GLX_FLOAT_COMPONENTS_NV 0x20B0 491 492Additions to Chapter 2 of the OpenGL 1.3 Specification (OpenGL Operation) 493 494 None. 495 496Additions to Chapter 3 of the OpenGL 1.3 Specification (Rasterization) 497 498 Modify Section 3.6.4, Rasterization of Pixel Rectangles (p. 91) 499 500 (modify first paragraph of "Final Conversion", p. 102) ... For RGBA 501 components, the final conversion depends on the format of the color 502 buffer. If the components of the color buffer are fixed-point, each 503 element is clamped to [0,1] and converted to fixed-point according to the 504 rules given in section 2.13.9 (Final Color Processing). If the components 505 of the color buffer are floating-point, the elements are not modified. 506 507 508 Modify Section 3.8.1, Texture Image Specification (p. 116) 509 510 (modify last paragaph, p. 116) The selected groups are processed exactly 511 as for DrawPixels stopping just before final conversion. For textures 512 with fixed-point RGBA internal formats, each R, G, B, A component is 513 clamped to [0,1]. 514 515 (modify first paragraph, p. 117) Components are then selected from the 516 resulting pixel groups to obtain a texture with the base internal format 517 specified by (or derived from) <internalformat>. Table 3.15 summarizes 518 the mapping of pixel group values to texture components, ... 519 520 (add to end of first paragraph, p. 117) Specifying a value of <format> 521 incompatible with <internalformat> produces the error INVALID_OPERATION. 522 A pixel format and texture internal format are compatible if the pixel 523 format can generate a pixel group of the type listed in the "Pixel Group 524 Type" column of Table 3.15 in the row corresponding to the base internal 525 format. 526 527 (add between first and second paragraphs, p.117) Textures with a base 528 internal format of FLOAT_R_NV, FLOAT_RG_NV, FLOAT_RGB_NV, and 529 FLOAT_RGBA_NV are known as floating-point textures. Floating-point 530 textures are only supported for the TEXTURE_RECTANGLE_NV target. 531 Specifying a floating-point texture with any other target will produce an 532 INVALID_OPERATION error. 533 534 (modify last paragraph, p. 117) The internal component resolution is the 535 number of bits allocated to each component in a texture image. If 536 internalformat is specified as a base internal format, the GL stores the 537 resulting texture with internal component resolutions of its own choosing. 538 If a sized internal format is specified, the memory allocation per texture 539 component is assigned by the GL to match the allocations listed in Table 540 3.16 as closely as possible. ... 541 542 (modify Table 3.15, p. 118 -- Respecify this table with all extensions 543 relevant to texture formats supported by NVIDIA. For this extension, add 544 four base internal formats.) 545 546 Base Internal Pixel Component Internal 547 Format Group Type Values Components 548 --------------------- ---------- --------- --------------- 549 ALPHA RGBA A A 550 LUMINANCE RGBA R L 551 LUMINANCE_ALPHA RGBA R,A L,A 552 INTENSITY RGBA R I 553 RGB RGBA R,G,B R,G,B 554 RGBA RGBA R,G,B,A R,G,B,A 555 * COLOR_INDEX CI CI CI 556 * DEPTH_COMPONENT DEPTH DEPTH DEPTH 557 * HILO_NV HILO HI,LO HI,LO 558 * DSDT_NV TEXOFF DS,DT DS,DT 559 * DSDT_MAG_NV TEXOFF DS,DT,MAG DS,DT,MAG 560 * DSDT_MAG_INTENSITY_NV TEXOFF 561 or RGBA DS,DT,MAG,VIB DS,DT,MAG,I 562 FLOAT_R_NV RGBA R R (float) 563 FLOAT_RG_NV RGBA R,G R,G (float) 564 FLOAT_RGB_NV RGBA R,G,B R,G,B (float) 565 FLOAT_RGBA_NV RGBA R,G,B,A R,G,B,A (float) 566 567 Table 3.15: Conversion from pixel groups to internal texture 568 components. "Pixel Group Type" defines the type of pixel group 569 required for the specified internal format. All internal components 570 are stored as unsigned-fixed point numbers, except for DS/DT (signed 571 fixed-point numbers) and floating-point R,G,B,A (signed floating-point 572 numbers). See Section 3.8.12 for a description of texture components 573 R, G, B, A, L, and I. See NV_texture_shader spec (Section 3.8.13) for 574 a description of texture components HI, LO, DS, DT, and MAG. 575 576 * - indicates formats found in other extension specs: COLOR_INDEX in 577 EXT_paletted texture; DEPTH_COMPONENT in SGIX_depth_texture; and 578 HILO_NV, DSDT_NV, DSDT_MAG_NV, DSDT_MAG_INTENSITY_NV in 579 NV_texture_shader. 580 581 (modify Table 3.16, p. 119 -- Respecify this table with all extensions 582 relevant to sized texture internal formats supported by NVIDIA. For this 583 extension, add eight sized internal formats.) 584 585 Sized Base 586 Int. Format Int. Format Component Name / Type-Size 587 ------------------- --------------- --------------------------- 588 ALPHA4 ALPHA A/U4 589 ALPHA8 ALPHA A/U8 590 ALPHA12 ALPHA A/U12 591 ALPHA16 ALPHA A/U16 592 LUMINANCE4 LUMINANCE L/U4 593 LUMINANCE8 LUMINANCE L/U8 594 LUMINANCE12 LUMINANCE L/U12 595 LUMINANCE16 LUMINANCE L/U16 596 LUMINANCE4_ALPHA4 LUMINANCE_ALPHA A/U4 L/U4 597 LUMINANCE6_ALPHA2 LUMINANCE_ALPHA A/U2 L/U6 598 LUMINANCE8_ALPHA8 LUMINANCE_ALPHA A/U8 L/U8 599 LUMINANCE12_ALPHA4 LUMINANCE_ALPHA A/U4 L/U12 600 LUMINANCE12_ALPHA12 LUMINANCE_ALPHA A/U12 L/U12 601 LUMINANCE16_ALPHA16 LUMINANCE_ALPHA A/U16 L/U16 602 INTENSITY4 INTENSITY I/U4 603 INTENSITY8 INTENSITY I/U8 604 INTENSITY12 INTENSITY I/U12 605 INTENSITY16 INTENSITY I/U16 606 R3_G3_B2 RGB R/U3 G/U3 B/U2 607 RGB4 RGB R/U4 G/U4 B/U4 608 RGB5 RGB R/U5 G/U5 B/U5 609 RGB8 RGB R/U8 G/U8 B/U8 610 RGB10 RGB R/U10 G/U10 B/10 611 RGB12 RGB R/U12 G/U12 B/U12 612 RGB16 RGB R/U16 G/U16 B/U16 613 RGBA2 RGBA R/U2 G/U2 B/U2 A/U2 614 RGBA4 RGBA R/U4 G/U4 B/U4 A/U4 615 RGB5_A1 RGBA R/U5 G/U5 B/U5 A/U1 616 RGBA8 RGBA R/U8 G/U8 B/U8 A/U8 617 RGB10_A2 RGBA R/U10 G/U10 B/U10 A/U2 618 RGBA12 RGBA R/U12 G/U12 B/U12 A/U12 619 RGBA16 RGBA R/U16 G/U16 B/U16 A/U16 620 * COLOR_INDEX1_EXT COLOR_INDEX CI/U1 621 * COLOR_INDEX2_EXT COLOR_INDEX CI/U2 622 * COLOR_INDEX4_EXT COLOR_INDEX CI/U4 623 * COLOR_INDEX8_EXT COLOR_INDEX CI/U8 624 * COLOR_INDEX16_EXT COLOR_INDEX CI/U16 625 * DEPTH_COMPONENT16_SGIX DEPTH_COMPONENT Z/U16 626 * DEPTH_COMPONENT24_SGIX DEPTH_COMPONENT Z/U24 627 * DEPTH_COMPONENT32_SGIX DEPTH_COMPONENT Z/U32 628 * HILO16_NV HILO HI/U16 LO/U16 629 * SIGNED_HILO16_NV HILO HI/S16 LO/S16 630 * SIGNED_RGBA8_NV RGBA R/S8 G/S8 B/S8 A/S8 631 * SIGNED_RGB8_ 632 UNSIGNED_ALPHA8_NV RGBA R/S8 G/S8 B/S8 A/U8 633 * SIGNED_RGB8_NV RGB R/S8 G/S8 B/S8 634 * SIGNED_LUMINANCE8_NV LUMINANCE L/S8 635 * SIGNED_LUMINANCE8_ 636 ALPHA8_NV LUMINANCE_ALPHA L/S8 A/S8 637 * SIGNED_ALPHA8_NV ALPHA A/S8 638 * SIGNED_INTENSITY8_NV INTENSITY I/S8 639 * DSDT8_NV DSDT_NV DS/S8 DT/S8 640 * DSDT8_MAG8_NV DSDT_MAG_NV DS/S8 DT/S8 MAG/U8 641 * DSDT8_MAG8_ DSDT_MAG_ 642 INTENSITY8_NV INTENSITY_NV DS/S8 DT/S8 MAG/U8 I/U8 643 FLOAT_R16_NV FLOAT_R_NV R/F16 644 FLOAT_R32_NV FLOAT_R_NV R/F32 645 FLOAT_RG16_NV FLOAT_RG_NV R/F16 G/F16 646 FLOAT_RG32_NV FLOAT_RG_NV R/F32 G/F32 647 FLOAT_RGB16_NV FLOAT_RGB_NV R/F16 G/F16 B/F16 648 FLOAT_RGB32_NV FLOAT_RGB_NV R/F32 G/F32 B/F32 649 FLOAT_RGBA16_NV FLOAT_RGBA_NV R/F16 G/F16 B/F16 A/F16 650 FLOAT_RGBA32_NV FLOAT_RGBA_NV R/F32 G/F32 B/F32 A/F32 651 652 Table 3.16: Sized Internal Formats. Describes the correspondence of 653 sized internal formats to base internal formats, and desired component 654 resolutions. Component resolution descriptions are of the form 655 "<NAME>/<TYPE><SIZE>", where NAME specifies the component name in 656 Table 3.15, TYPE is "U" for unsigned fixed-point, "S" for signed 657 fixed-point, and "F" for unsigned floating-point. <SIZE> is the 658 number of requested bits per component. 659 660 * - indicates formats found in other extension specs: COLOR_INDEX in 661 EXT_paletted texture; DEPTH_COMPONENT in SGIX_depth_texture; and 662 HILO_NV, DSDT_NV, DSDT_MAG_NV, DSDT_MAG_INTENSITY_NV in 663 NV_texture_shader. 664 665 Modify Section 3.8,7, Minification (p. 141) 666 667 Change the last paragraph (as modified by the NV_texture_shader 668 extension) to read (only the last sentence changes from the 669 NV_texture_shader version): 670 671 "If any of the selected tauijk, tauij, or taui in the above equations 672 refer to a border texel with i < -bs, j < bs, k < -bs, i >= ws-bs, j 673 >= hs-bs, or k >= ds-bs, then the border values given by the current 674 setting of TEXTURE_BORDER_VALUES is used instead of the unspecified 675 value or values. If the texture contains color components, the 676 components of the TEXTURE_BORDER_VALUES vector are interpreted as 677 an RGBA color to match the texture's internal format in a manner 678 consistent with table 3.15. If the texture contains HILO components, 679 the first and second components of the TEXTURE_BORDER_VALUES vector 680 are interpreted as the hi and lo components respectively. If the 681 texture contains texture offset group components, the first, second, 682 third, and fourth components of the TEXTURE_BORDER_VALUES vector 683 are interpreted as ds, dt, mag, and vib components respectively. 684 Additionally, the texture border values are clamped appropriately 685 depending on the signedness of each particular component. Unsigned 686 components and components of floating-point textures are clamped to 687 [0,1]; signed components (not including floating-point textures) 688 are clamped to [-1,1]." 689 690 (Add after the last paragraph in the section) Floating-point textures 691 (those with a base internal format of FLOAT_R_NV, FLOAT_RG_NV, 692 FLOAT_RGB_NV, or FLOAT_RGBA_NV) do not support texture filters other than 693 NEAREST. For such textures, NEAREST filtering is applied regardless of 694 the setting of TEXTURE_MIN_FILTER. 695 696 Modify Section 3.8.8, Magnification (p. 141) 697 698 (Add after the last paragraph in the section) Floating-point textures 699 (those with a base internal format of FLOAT_R_NV, FLOAT_RG_NV, 700 FLOAT_RGB_NV, or FLOAT_RGBA_NV) do not support texture filters other than 701 NEAREST. For such textures, NEAREST filtering is applied regardless of 702 the setting of TEXTURE_MAG_FILTER. 703 704 Modify Section 3.8.13, Texture Environments and Texture Functions (p. 147) 705 706 (Add paragraph after discussion of all the values used in the 707 miscellaneous tables in this section.) If the base internal format is 708 HILO_NV, DSDT_NV, DSDT_MAG_NV, DSDT_MAG_INTENSITY_NV, FLOAT_R_NV, 709 FLOAT_RG_NV, FLOAT_RGB_NV, or FLOAT_RGBA_NV, the texture lookup results 710 are not supported using conventional OpenGL texture functions. In this 711 case, the corresponding texture function is NONE (Cv = Cf, Av = Af), and 712 it is as though texture mapping were disabled for that texture unit. 713 714 Modify Section 3.11, Antialiasing Application (p. 155) 715 716 Finally, if antialiasing is enabled for the primitive from which a 717 rasterized fragment was produced, then the computed coverage value may be 718 applied to the fragment. In RGBA mode with fixed-point frame buffers, the 719 value is multiplied by the fragment's alpha (A) value to yield a final 720 alpha value. In RGBA mode with floating-point frame buffers, the coverage 721 value is simply discarded. In color index mode, the value is used to set 722 the low order bits of the color index value as described in section 3.2. 723 724 725Additions to Chapter 4 of the OpenGL 1.3 Specification (Per-Fragment 726Operations and the Frame Buffer) 727 728 Modify Chapter 4 Introduction (p. 156) 729 730 (replace next-to-last paragraph) 731 732 The GL provides three types of color buffers: color index, fixed-point 733 RGBA, or floating-point RGBA. Color index buffers consist of unsigned 734 integer color indices. Fixed-point RGBA buffers consist of R, G, B, and 735 optionally, A unsigned integer values. Floating-point RGBA buffers 736 consist of R, and optionally, G, B, and A floating-point component values, 737 corresponding to the X, Y, Z, and W outputs, respectively, of a fragment 738 program. The number of bitplanes in each of the color buffers, the depth 739 buffer, ... 740 741 Modify Section 4.1.3, Multisample Fragment Operations (p. 158) 742 743 This step applies only for fixed-point RGBA color buffers. Otherwise, 744 proceed to the next step. ... 745 746 Modify Section 4.1.4, Alpha Test (p. 159) 747 748 This step applies only for fixed-point RGBA color buffers. Otherwise, 749 proceed to the next step. ... 750 751 Modify Section 4.1.7, Blending (p. 161) 752 753 (modify second paragraph) 754 755 This blending is dependent on the incoming fragment's alpha value and that 756 of the corresponding currently stored pixel. Blending applies only for 757 fixed-point RGBA color buffers; otherwise, it is bypassed. ... 758 759 Modify Section 4.1.8, Dithering (p. 165) 760 761 Dithering selects between two color values or indices. Dithering does not 762 apply to floating-point RGBA color buffers. ... 763 764 Modify Section 4.1.9, Logical Operation (p. 165) 765 766 Finally, a logical operation is applied between the incoming fragment's 767 color or index values and the color or index values stored at the 768 corresponding location in the frame buffer. Logical operations do not 769 apply to floating-point color buffers. ... 770 771 Modify Section 4.2.3, Clearing the Buffers (p. 171) 772 773 ... 774 775 void ClearColor(float r, float g, float b, float a); 776 777 sets the clear value for RGBA color buffers. When a fixed-point color 778 buffer is cleared, the effective clear color is derived by clamping each 779 component to [0,1] and converting to fixed-point according to the rules in 780 section 2.13.9. When a floating-point color buffer is cleared, the 781 components of the clear value are used directly without being clamped. 782 783 Modify Section 4.2.4, The Accumulation Buffer (p. 172) 784 785 (modify last paragraph) ... If there is no accumulation buffer, or if 786 color buffer is not fixed-point RGBA, Accum generates the error 787 INVALID_OPERATION. 788 789 Modify Section 4.3.2, Reading Pixels 790 791 (modify "Conversion of RGBA Values", p. 176) This step applies only if the 792 GL is in RGBA mode, and then only if format is neither STENCIL INDEX nor 793 DEPTH COMPONENT. The R, G, B, and A values form a group of elements. If 794 the color buffer has fixed-point format, each element is taken to be a 795 fixed-point value in [0,1] with m bits, where m is the number of bits in 796 the corresponding color component of the selected buffer (see section 797 2.13.9). 798 799 (add to end of "Final Conversion", p. 177) ... For an RGBA color, 800 components are clamped depending on the data type of the buffer being 801 read. For fixed-point buffers, each component is clamped to [0.1]. For 802 floating-point buffers, if <type> is not FLOAT or HALF_FLOAT_NV, each 803 component is clamped to [0,1] if <type> is unsigned or [-1,1] if <type> is 804 signed and then converted according to Table 4.7. 805 806 Modify section 4.4.4, as defined by EXT_framebuffer_object, 807 definition of color-renderable: 808 809 * An internal format is "color-renderable" if it is RGB, RGBA, 810 FLOAT_R_NV, FLOAT_RG_NV, FLOAT_RGB_NV, FLOAT_RGBA_NV, or one 811 of the formats from table 3.16 whose base internal format is 812 RGB, RGBA, FLOAT_R_NV, FLOAT_RG_NV, FLOAT_RGB_NV, or 813 FLOAT_RGBA_NV. No other formats, including compressed 814 internal formats, are color-renderable. 815 816Additions to Chapter 5 of the OpenGL 1.3 Specification (Special Functions) 817 818 None. 819 820Additions to Chapter 6 of the OpenGL 1.3 Specification (State and 821State Requests) 822 823 Modify Section 6.1.4, Texture Queries (p. 200) 824 825 Modify Table 6.1 (add new rows, corresponding to new internal formats, 826 p. 202) 827 828 Base Internal Format R G B A 829 -------------------- --- --- --- --- 830 FLOAT_R_NV R 0 0 1 831 FLOAT_RG_NV R G 0 1 832 FLOAT_RGB_NV R G B 1 833 FLOAT_RGBA_NV R G B A 834 835Additions to Appendix A of the OpenGL 1.3 Specification (Invariance) 836 837 None. 838 839Additions to the WGL Specification 840 841 First, close your eyes and pretend that a WGL specification actually 842 existed. Maybe if we all concentrate hard enough, one will magically 843 appear. 844 845 Modify/add to the description of <piAttributes> in 846 wglGetPixelFormatAttribivARB and <pfAttributes> in 847 wglGetPixelFormatAttribfvARB: 848 849 WGL_FLOAT_COMPONENTS_NV 850 True if the R, G, B, and A components of each color buffer are 851 represented as (unclamped) floating-point numbers. 852 853 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 854 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 855 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 856 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 857 True if the pixel format describes a floating-point color that can be 858 bound to a texture rectangle with internal formats of FLOAT_R_NV, 859 FLOAT_RG_NV, FLOAT_RGB_NV, or FLOAT_RGBA_NV, respectively. Currently 860 only pbuffers can be bound as textures so this attribute will only be 861 TRUE if WGL_DRAW_TO_PBUFFER is also TRUE. Additionally, 862 floating-point color buffers can not be bound to texture targets other 863 than TEXTURE_RECTANGLE_NV. 864 865 Add new table entries for pixel format attribute matching in 866 wglChoosePixelFormatARB. 867 868 Attribute Type Match Criteria 869 ------------------------- ------- -------------- 870 WGL_FLOAT_COMPONENTS_NV boolean exact 871 WGL_BIND_TO_TEXTURE_ boolean exact 872 RECTANGLE_FLOAT_R_NV 873 WGL_BIND_TO_TEXTURE_ boolean exact 874 RECTANGLE_FLOAT_RG_NV 875 WGL_BIND_TO_TEXTURE_ boolean exact 876 RECTANGLE_FLOAT_RGB_NV 877 WGL_BIND_TO_TEXTURE_ boolean exact 878 RECTANGLE_FLOAT_RGBA_NV 879 880 (In the wglCreatePbufferARB section, modify the attribute list) 881 882 WGL_TEXTURE_FORMAT_ARB 883 884 This attribute indicates the base internal format of the texture that 885 will be created when a color buffer of a pbuffer is bound to a texture 886 map. It can be set to WGL_TEXTURE_RGB_ARB (indicating an internal 887 format of RGB), WGL_TEXTURE_RGBA_ARB (indicating a base internal 888 format of RGBA), WGL_TEXTURE_FLOAT_R_NV (indicating a base internal 889 format of FLOAT_R_NV), WGL_TEXTURE_FLOAT_RG_NV (indicating a base 890 internal format of FLOAT_RG_NV), WGL_TEXTURE_FLOAT_RGB_NV (indicating 891 a base internal format of FLOAT_RGB_NV), WGL_TEXTURE_FLOAT_RGBA_NV 892 (indicating a base internal format of FLOAT_RGBA_NV), or 893 WGL_NO_TEXTURE_ARB. The default value is WGL_NO_TEXTURE_ARB. 894 895 896 (In the wglCreatePbufferARB section, modify the discussion of what happens 897 to the depth/stencil/accum buffers when switching between mipmap levels or 898 cube map faces.) 899 900 For pbuffers with a texture format of WGL_TEXTURE_RGB_ARB, 901 WGL_TEXTURE_RGBA_ARB, WGL_TEXTURE_FLOAT_R_NV, WGL_TEXTURE_FLOAT_RG_NV, 902 WGL_TEXTURE_FLOAT_RGB_NV, or WGL_TEXTURE_FLOAT_RGBA_NV, there will be a 903 separate set of color buffers for each mipmap level and cube map face in 904 the pbuffer. Otherwise, the WGL implementation is free to share a single 905 set of color, auxillary, and accumulation buffers between levels or faces. 906 907 908 (In the wglCreatePbufferARB section, modify the error list) 909 910 ERROR_INVALID_DATA WGL_TEXTURE_FORMAT_ARB is 911 WGL_TEXTURE_FLOAT_R_NV, 912 WGL_TEXTURE_FLOAT_RG_NV, 913 WGL_TEXTURE_FLOAT_RGB_NV, or 914 WGL_TEXTURE_FLOAT_RGBA_NV, and 915 WGL_TEXTURE_TARGET_ARB is not 916 WGL_TEXTURE_RECTANGLE_NV. 917 918 ERROR_INVALID_DATA WGL_TEXTURE_FORMAT_ARB is 919 WGL_TEXTURE_FLOAT_R_NV, 920 WGL_TEXTURE_TARGET_ARB is 921 WGL_TEXTURE_RECTANGLE_NV, and the 922 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 923 attribute is not set in the pixel format. 924 925 ERROR_INVALID_DATA WGL_TEXTURE_FORMAT_ARB is 926 WGL_TEXTURE_FLOAT_RG_NV, 927 WGL_TEXTURE_TARGET_ARB is 928 WGL_TEXTURE_RECTANGLE_NV, and the 929 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 930 attribute is not set in the pixel format. 931 932 ERROR_INVALID_DATA WGL_TEXTURE_FORMAT_ARB is 933 WGL_TEXTURE_FLOAT_RGB_NV, 934 WGL_TEXTURE_TARGET_ARB is 935 WGL_TEXTURE_RECTANGLE_NV, and the 936 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 937 attribute is not set in the pixel format. 938 939 ERROR_INVALID_DATA WGL_TEXTURE_FORMAT_ARB is 940 WGL_TEXTURE_FLOAT_RGBA_NV, 941 WGL_TEXTURE_TARGET_ARB is 942 WGL_TEXTURE_RECTANGLE_NV, and the 943 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 944 attribute is not set in the pixel format. 945 946 Modify wglBindTexImageARB: 947 948 ... 949 950 The pbuffer attribute WGL_TEXTURE_FORMAT_ARB determines the base 951 internal format of the texture. The format-specific component sizes 952 are also determined by pbuffer attributes as shown in the table below. 953 The component sizes are dependent on the format of the texture. 954 955 Component Size Format 956 --------- ------------------------ ---------------------------- 957 R WGL_RED_BITS_ARB RGB, RGBA, FLOAT_R, FLOAT_RG, 958 FLOAT_RGB, FLOAT_RGBA 959 G WGL_GREEN_BITS_ARB RGB, RGBA, FLOAT_R, FLOAT_RG, 960 FLOAT_RGB, FLOAT_RGBA 961 B WGL_BLUE_BITS_ARB RGB, RGBA, FLOAT_R, FLOAT_RG, 962 FLOAT_RGB, FLOAT_RGBA 963 A WGL_ALPHA_BITS_ARB RGB, RGBA, FLOAT_R, FLOAT_RG, 964 FLOAT_RGB, FLOAT_RGBA 965 966 967Additions to the AGL Specification 968 969 None 970 971Additions to the GLX Specification 972 973 <very incomplete> 974 975 The GLX_FLOAT_COMPONENTS_NV framebuffer config attribute is a 976 boolean (or GLX_DONT_CARE) indicating if floating-point components 977 are requested. 978 979Dependencies on EXT_paletted_texture, SGIX_depth_texture, and NV_texture_shader 980 981 If any of these extensions are not supported, the rows in Tables 3.15 and 982 3.16 corresponding to texture formats defined by the unsupported extension 983 should be removed. 984 985 If NV_texture_shader is not supported, ignore the amended 986 paragraph from the NV_texture_shader specificiaton describing 987 TEXTURE_BORDER_VALUES clamping in favor of the original OpenGL 988 specification language. 989 990Dependencies on NV_half_float 991 992 If GL_NV_half_float is not supported, all references to HALF_FLOAT_NV 993 should be deleted. 994 995Dependencies on ARB_color_buffer_float and ATI_pixel_format_float 996 997 If ARB_color_buffer_float and ATI_pixel_format_float are also supported, 998 the GL would have two different floating-point frame buffer models with 999 different restrictions. To avoid having to carry these differences all 1000 the way down the pipeline and provide two distinct sets of frame buffer 1001 formats, the following limitations on rendering to floating-point color 1002 buffers in this extension are removed if ARB_color_buffer_float or 1003 ATI_pixel_format_float is supported: 1004 1005 Modify Section 3.11, Antialiasing Application (p. 155) 1006 1007 ... In RGBA mode with floating-point frame buffers, the coverage value 1008 is simply discarded. ... 1009 1010 Modify Section 4.1.3, Multisample Fragment Operations (p. 158) 1011 1012 This step applies only for fixed-point RGBA color buffers. Otherwise, 1013 proceed to the next step. ... 1014 1015 Modify Section 4.1.4, Alpha Test (p. 159) 1016 1017 This step applies only for fixed-point RGBA color buffers. Otherwise, 1018 proceed to the next step. ... 1019 1020 Modify Section 4.1.7, Blending (p. 161) 1021 1022 (modify second paragraph) 1023 1024 This blending is dependent on the incoming fragment's alpha value and 1025 that of the corresponding currently stored pixel. Blending applies only 1026 for fixed-point RGBA color buffers; otherwise, it is bypassed. ... 1027 1028 Modify Section 4.2.4, The Accumulation Buffer (p. 172) 1029 1030 (modify last paragraph) ..., or if color buffer is not fixed-point RGBA, 1031 1032 When blending is enabled with a floating-point color buffer, the spec 1033 language in ARB_color_buffer_float describes how blending is performed. 1034 1035 The above restrictions remain in effect on NV3X (GeForce FX, Quadro FX) 1036 hardware, where neither ARB_color_buffer_float nor ATI_pixel_format_float 1037 is supported. 1038 1039 Additionally, if ARB_color_buffer_float or ATI_pixel_format_float is 1040 supported, the following errors are not generated: 1041 1042 INVALID_OPERATION is generated by Begin, DrawPixels, Bitmap, CopyPixels, 1043 or a command that performs an explicit Begin if the color buffer has a 1044 floating-point RGBA format and FRAGMENT_PROGRAM_NV is disabled. 1045 1046 INVALID_OPERATION is generated by Accum if the color buffer has a color 1047 index or floating-point RGBA format. 1048 1049Dependencies on ARB_texture_float and ATI_texture_float 1050 1051 If ARB_texture_float or ATI_texture_float is also supported, the GL would 1052 have two different sets of floating-point textures with different 1053 restrictions. To avoid having to carry these differences all the way down 1054 the pipeline, the following limitations on filtering of NV_float_buffer 1055 textures are removed if ARB_texture_float or ATI_texture_float is 1056 supported: 1057 1058 Modify Section 3.8,7, Minification (p. 141) 1059 1060 (Add after the last paragraph in the section) Floating-point textures 1061 (those with a base internal format of FLOAT_R_NV, FLOAT_RG_NV, 1062 FLOAT_RGB_NV, or FLOAT_RGBA_NV) do not support texture filters other 1063 than NEAREST. For such textures, NEAREST filtering is applied 1064 regardless of the setting of TEXTURE_MIN_FILTER. 1065 1066 Modify Section 3.8.8, Magnification (p. 141) 1067 1068 (Add after the last paragraph in the section) Floating-point textures 1069 (those with a base internal format of FLOAT_R_NV, FLOAT_RG_NV, 1070 FLOAT_RGB_NV, or FLOAT_RGBA_NV) do not support texture filters other 1071 than NEAREST. For such textures, NEAREST filtering is applied 1072 regardless of the setting of TEXTURE_MAG_FILTER. 1073 1074 The above restrictions remain in effect on NV3X (GeForce FX, Quadro FX) 1075 hardware, where ARB_texture_float and ATI_texture_float are not supported. 1076 1077 The following restriction requiring the use of rectangle textures does 1078 remain in effect for NV_float_buffer texture formats, even though 1079 ARB_texture_float and ATI_texture_float provides the ability to use 1080 floating-point textures with non-rectangle targets. If this capability is 1081 required, use the texture formats defined in ARB_texture_float or 1082 ATI_texture_float. 1083 1084 (add between first and second paragraphs, p.117) Textures with a base 1085 internal format of FLOAT_R_NV, FLOAT_RG_NV, FLOAT_RGB_NV, and 1086 FLOAT_RGBA_NV are known as floating-point textures. Floating-point 1087 textures are only supported for the TEXTURE_RECTANGLE_NV target. 1088 Specifying a floating-point texture with any other target will produce 1089 an INVALID_OPERATION error. 1090 1091Dependencies on EXT_framebuffer_object 1092 1093 If EXT_framebuffer_object is not supported, then ignore any 1094 reference to EXT_framebuffer_object. 1095 1096GLX Protocol 1097 1098 None. 1099 1100Errors 1101 1102 INVALID_OPERATION is generated by Begin, DrawPixels, Bitmap, CopyPixels, 1103 or a command that performs an explicit Begin if the color buffer has a 1104 floating-point RGBA format and FRAGMENT_PROGRAM_NV is disabled. 1105 1106 INVALID_OPERATION is generated by TexImage3D, TexImage2D, TexImage1D, 1107 TexSubImage3D, TexSubImage2D, or TexSubImage1D if the pixel group type 1108 corresponding to <format> is not compatible with the base internal format 1109 of the texture. 1110 1111 INVALID_OPERATION is generated by TexImage3D, TexImage1D, or 1112 CopyTexImage1D if the base internal format corresponding to 1113 <internalformat> is FLOAT_R_NV, FLOAT_RG_NV, FLOAT_RGB_NV, or 1114 FLOAT_RGBA_NV. 1115 1116 INVALID_OPERATION is generated by TexImage2D or CopyTexImage2D if the base 1117 internal format corresponding to <internalformat> is FLOAT_R_NV, 1118 FLOAT_RG_NV, FLOAT_RGB_NV, or FLOAT_RGBA_NV and <target> is not 1119 TEXTURE_RECTANGLE_NV. 1120 1121 INVALID_OPERATION is generated by Accum if the color buffer has a color 1122 index or floating-point RGBA format. 1123 1124 ERROR_INVALID_DATA is generated by wglCreatePbufferARB if 1125 WGL_TEXTURE_FORMAT_ARB is WGL_TEXTURE_FLOAT_R_NV, WGL_TEXTURE_FLOAT_RG_NV, 1126 WGL_TEXTURE_FLOAT_RGB_NV, or WGL_TEXTURE_FLOAT_RGBA_NV, and 1127 WGL_TEXTURE_TARGET_ARB is not WGL_TEXTURE_RECTANGLE_NV. 1128 1129 ERROR_INVALID_DATA is generated by wglCreatePbufferARB if 1130 WGL_TEXTURE_FORMAT_ARB is WGL_TEXTURE_FLOAT_R_NV, WGL_TEXTURE_TARGET_ARB 1131 is WGL_TEXTURE_RECTANGLE_NV, and the 1132 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV attribute is not set in the pixel 1133 format. 1134 1135 ERROR_INVALID_DATA is generated by wglCreatePbufferARB if 1136 WGL_TEXTURE_FORMAT_ARB is WGL_TEXTURE_FLOAT_RG_NV, WGL_TEXTURE_TARGET_ARB 1137 is WGL_TEXTURE_RECTANGLE_NV, and the 1138 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV attribute is not set in the 1139 pixel format. 1140 1141 ERROR_INVALID_DATA is generated by wglCreatePbufferARB if 1142 WGL_TEXTURE_FORMAT_ARB is WGL_TEXTURE_FLOAT_RGB_NV, WGL_TEXTURE_TARGET_ARB 1143 is WGL_TEXTURE_RECTANGLE_NV, and the 1144 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV attribute is not set in the 1145 pixel format. 1146 1147 ERROR_INVALID_DATA is generated by wglCreatePbufferARB if 1148 WGL_TEXTURE_FORMAT_ARB is WGL_TEXTURE_FLOAT_RGBA_NV, 1149 WGL_TEXTURE_TARGET_ARB is WGL_TEXTURE_RECTANGLE_NV, and the 1150 WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV attribute is not set in the 1151 pixel format. 1152 1153 1154New State 1155 1156 (Modify Table 6.15, Texture Objects (cont.), p. 223) 1157 1158 Init. 1159 Get Value Type Get Command Value Description Sec. Attribute 1160 --------------------------- ----- ------------ ----- --------------------- ----- ------------ 1161 TEXTURE_FLOAT_COMPONENTS_NV n x B GetTexLevel- 0 True if texture holds 3.8 - 1162 unclamped floating- 1163 point values 1164 1165 (Modify Table 6.19, Framebuffer Control, p. 227) 1166 1167 Init. 1168 Get Value Type Get Command Value Description Sec. Attribute 1169 -------------------------- ---- ----------- ------- ------------------------ ----- ------------ 1170 COLOR_CLEAR_VALUE C GetFloatv 0,0,0,0 Color buffer clear value 4.2.3 color-buffer 1171 (RGBA mode), each value 1172 clamped to [0,1]. 1173 FLOAT_CLEAR_COLOR_VALUE_NV 4xR GetFloatv 0,0,0,0 Color buffer clear value 4.2.3 color-buffer 1174 (RGBA mode), each value 1175 unclamped. 1176 1177 1178New Implementation Dependent State 1179 1180 (Modify Table 6.28, Implementation Dependent Values, p. 236) 1181 1182 Init. 1183 Get Value Type Get Command Value Description Sec. Attribute 1184 ------------------ ---- ----------- ----- --------------------- ---- --------- 1185 FLOAT_RGBA_MODE_NV B GetBooleanv - True if color buffers 4 - 1186 store floating-point 1187 data 1188 1189NV3x Implementation Details 1190 1191 NV3x GPUs (GeForce FX, etc.) support hardware acceleration for float 1192 textures with two or more components only when the repeat mode state 1193 (S and T) is GL_CLAMP_TO_EDGE. If you use either the GL_CLAMP or 1194 GL_CLAMP_TO_BORDER repeat modes with a float texture with two or 1195 more components, the software rasterizer is used. 1196 1197 However, if you use a single-component float texture (GL_FLOAT_R_NV, 1198 etc.), all clamping repeat modes (GL_CLAMP, GL_CLAMP_TO_EDGE, and 1199 GL_CLAMP_TO_BORDER) are available with full hardware acceleration. 1200 1201 The two-, three-, and four-component texture formats all use the 1202 same amount of texture memory storage (128 bits per texel for the 1203 GL_FLOAT_x32 formats, and 64 bits per texel for the GL_FLOAT_x16 1204 formats). Future GPUs will likely store two and three component 1205 float textures more efficiently. 1206 1207 The GL_FLOAT_R32_NV and GL_FLOAT_R16_NV texture formats each use 32 1208 bits per texel. Future GPUs will likely store GL_FLOAT_R16_NV more 1209 efficiently. 1210 1211 NVIDIA treats the unsized internal formats GL_FLOAT_R_NV, 1212 GL_FLOAT_RGBA_NV, etc. the same as GL_FLOAT_R32_NV, 1213 GL_FLOAT_RGBA32_NV, etc. 1214 1215Revision History 1216 1217 Rev. Date Author Changes 1218 ---- -------- -------- -------------------------------------------- 1219 20 11/03/06 mjk Update Status 1220 1221 19 01/10/05 mjk Add very minimal GLX discussion 1222 1223 18 09/12/05 jjuliano Describe interaction with EXT_framebuffer_object. 1224 The GL_FLOAT_*_NV texture formats are 1225 color-renderable. 1226 1227 17 04/04/05 pbrown Describe interactions with ARB_texture_float and 1228 ARB_color_buffer_float (as well as the ATI 1229 equivalents), which remove some of the 1230 restrictions of this extension, when supported. 1231 1232 16 06/16/03 pbrown Corrected the usage of WGL_TEXTURE_FLOAT_R_NV and 1233 related enums in the list of enumerants. 1234 1235 15 01/23/03 mjk Document texture border color (values) behavior 1236 for float textures. See issue. 1237 1238 14 01/20/03 mjk Added NV3x Implementation Details section. 1239 1240 13 11/27/02 pbrown Fixed the name of the clear color query enum in 1241 the state table -- the core spec says 1242 COLOR_CLEAR_VALUE. The enum in this extension is 1243 FLOAT_CLEAR_COLOR_VALUE_NV. Documented this 1244 inconsistency. 1245 1246 12 10/09/02 pbrown Clarified that the floating-point internal format 1247 enums can not be passed TexImage1D and 1248 TexImage3D. 1249 1250 11 07/19/02 pbrown Cleaned up a number of items in the issues 1251 section. Removed limitation that DrawPixels and 1252 CopyPixels color components are clamped to 1253 [0,1]. Removed language modifying multisample 1254 color filtering -- if multisample buffers are 1255 supported, the color components will be filtered 1256 on a componentwise basis. 1257 1258 10 07/09/02 pbrown Fixed contradictory issue resolutions. 1259 1260 9 01/31/02 pbrown Added revision history. 1261 1262 8 01/29/02 pbrown Fix spec to indicate that 1263 TEXTURE_FLOAT_COMPONENTS_NV is queried by 1264 GetTexLevelParameter*() calls instead of the 1265 generic gets. 1266 1267 7 12/26/01 pbrown Documented limitation where DrawPixels/CopyPixels 1268 data are clamped to [0,1], even when the color 1269 buffer is floating-point. This is consistent 1270 with the fact that pixel data is supposed to go 1271 in f[COL0] (fixed-point interpolator). Changed 1272 float texture to RGBA expansion to always fill in 1273 with (0,0,0,1), not (0,0,0,0). This is more 1274 consistent with our other texture formats. 1275 1276 6 11/30/01 pbrown Assigned WGL enumerant values. 1277 1278 5 11/27/01 pbrown Modify NV_float_buffer to eliminate the 1279 dependencies on NV_render_depth_texture, now that 1280 they are no longer necessary. More pedantic 1281 fixes. 1282 1283 4 10/29/01 pbrown Add documentation of possible uses of 1284 floating-point color buffers. 1285 1286 3 10/19/01 pbrown Assign GL enumerants. Fixed some bugs in the use 1287 of #defines in the spec. Added ARB_imaging 1288 and SGIS_generate_mipmap interaction issues. 1289