15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci NV_texture_shader 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_NV_texture_shader 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Mark J. Kilgard, NVIDIA Corporation (mjk 'at' nvidia.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNotice 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Copyright NVIDIA Corporation, 1999, 2000, 2001, 2002, 2004. 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciIP Status 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci NVIDIA Proprietary. 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciStatus 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci Shipping (since GeForce3) 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ciVersion 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ci NVIDIA Date: March 13, 2007 285bd8deadSopenharmony_ci Version: 30 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ciNumber 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ci 230 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ciDependencies 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ci Written based on the wording of the OpenGL 1.2.1 specification. 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci Requires support for the ARB_multitexture extension. 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci Requires support for the ARB_texture_cube_map extension. 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci NV_register_combiners affects the definition of this extension. 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci EXT_texture_lod_bias trivially affects the definition of this 455bd8deadSopenharmony_ci extension. 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci ARB_texture_env_combine and/or EXT_texture_env_combine affect the 485bd8deadSopenharmony_ci definition of this extension. 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci NV_texture_env_combine4 affects the definition of this extension. 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci ARB_texture_env_add and/or EXT_texture_env_add affect the definition 535bd8deadSopenharmony_ci of this extension. 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci NV_texture_rectangle affects the definition of this extension. 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci NV_texture_shader2 depends on the definition of this extension. 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci ARB_color_buffer_float affects the definiton of this extension. 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ciOverview 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci Standard OpenGL and the ARB_multitexture extension define a 645bd8deadSopenharmony_ci straightforward direct mechanism for mapping sets of texture 655bd8deadSopenharmony_ci coordinates to filtered colors. This extension provides a more 665bd8deadSopenharmony_ci functional mechanism. 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci OpenGL's standard texturing mechanism defines a set of texture 695bd8deadSopenharmony_ci targets. Each texture target defines how the texture image 705bd8deadSopenharmony_ci is specified and accessed via a set of texture coordinates. 715bd8deadSopenharmony_ci OpenGL 1.0 defines the 1D and 2D texture targets. OpenGL 1.2 725bd8deadSopenharmony_ci (and/or the EXT_texture3D extension) defines the 3D texture target. 735bd8deadSopenharmony_ci The ARB_texture_cube_map extension defines the cube map texture 745bd8deadSopenharmony_ci target. Each texture unit's texture coordinate set is mapped to a 755bd8deadSopenharmony_ci color using the unit's highest priority enabled texture target. 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci This extension introduces texture shader stages. A sequence of 785bd8deadSopenharmony_ci texture shader stages provides a more flexible mechanism for mapping 795bd8deadSopenharmony_ci sets of texture coordinates to texture unit RGBA results than standard 805bd8deadSopenharmony_ci OpenGL. 815bd8deadSopenharmony_ci 825bd8deadSopenharmony_ci When the texture shader enable is on, the extension replaces the 835bd8deadSopenharmony_ci conventional OpenGL mechanism for mapping sets of texture coordinates 845bd8deadSopenharmony_ci to filtered colors with this extension's sequence of texture shader 855bd8deadSopenharmony_ci stages. 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci Each texture shader stage runs one of 21 canned texture shader 885bd8deadSopenharmony_ci programs. These programs support conventional OpenGL texture 895bd8deadSopenharmony_ci mapping but also support dependent texture accesses, dot product 905bd8deadSopenharmony_ci texture programs, and special modes. (3D texture mapping 915bd8deadSopenharmony_ci texture shader operations are NOT provided by this extension; 925bd8deadSopenharmony_ci 3D texture mapping texture shader operations are added by the 935bd8deadSopenharmony_ci NV_texture_shader2 extension that is layered on this extension. 945bd8deadSopenharmony_ci See the NV_texture_shader2 specification.) 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci To facilitate the new texture shader programs, this extension 975bd8deadSopenharmony_ci introduces several new texture formats and variations on existing 985bd8deadSopenharmony_ci formats. Existing color texture formats are extended by introducing 995bd8deadSopenharmony_ci new signed variants. Two new types of texture formats (beyond colors) 1005bd8deadSopenharmony_ci are also introduced. Texture offset groups encode two signed offsets, 1015bd8deadSopenharmony_ci and optionally a magnitude or a magnitude and an intensity. The new 1025bd8deadSopenharmony_ci HILO (pronounced high-low) formats provide possibly signed, high 1035bd8deadSopenharmony_ci precision (16-bit) two-component textures. 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci Each program takes as input the stage's interpolated texture 1065bd8deadSopenharmony_ci coordinate set (s,t,r,q). Each program generates two results: 1075bd8deadSopenharmony_ci a shader stage result that may be used as an input to subsequent 1085bd8deadSopenharmony_ci shader stage programs, and a texture unit RGBA result that becomes the 1095bd8deadSopenharmony_ci texture color used by the texture unit's texture environment function 1105bd8deadSopenharmony_ci or becomes the initial value for the corresponding texture register 1115bd8deadSopenharmony_ci for register combiners. The texture unit RGBA result is always 1125bd8deadSopenharmony_ci an RGBA color, but the shader stage result may be one of an RGBA 1135bd8deadSopenharmony_ci color, a HILO value, a texture offset group, a floating-point value, 1145bd8deadSopenharmony_ci or an invalid result. When both results are RGBA colors, the shader 1155bd8deadSopenharmony_ci stage result and the texture unit RGBA result are usually identical 1165bd8deadSopenharmony_ci (though not in all cases). 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci Additionally, certain programs have a side-effect such as culling 1195bd8deadSopenharmony_ci the fragment or replacing the fragment's depth value. 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci The twenty-one programs are briefly described: 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci <none> 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci 1. NONE - Always generates a (0,0,0,0) texture unit RGBA result. 1265bd8deadSopenharmony_ci Equivalent to disabling all texture targets in conventional 1275bd8deadSopenharmony_ci OpenGL. 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci <conventional textures> 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci 2. TEXTURE_1D - Accesses a 1D texture via (s/q). 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci 3. TEXTURE_2D - Accesses a 2D texture via (s/q,t/q). 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci 4. TEXTURE_RECTANGLE_NV - Accesses a rectangular texture via (s/q,t/q). 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ci 5. TEXTURE_CUBE_MAP_ARB - Accesses a cube map texture via (s,t,r). 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci <special modes> 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci 6. PASS_THROUGH_NV - Converts a texture coordinate (s,t,r,q) 1425bd8deadSopenharmony_ci directly to a [0,1] clamped (r,g,b,a) texture unit RGBA result. 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci 7. CULL_FRAGMENT_NV - Culls the fragment based on the whether each 1455bd8deadSopenharmony_ci (s,t,r,q) is "greater than or equal to zero" or "less than zero". 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci <offset textures> 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci 8. OFFSET_TEXTURE_2D_NV - Transforms the signed (ds,dt) components 1505bd8deadSopenharmony_ci of a previous texture unit by a 2x2 floating-point matrix and 1515bd8deadSopenharmony_ci then uses the result to offset the stage's texture coordinates 1525bd8deadSopenharmony_ci for a 2D non-projective texture. 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci 9. OFFSET_TEXTURE_2D_SCALE_NV - Same as above except the magnitude 1555bd8deadSopenharmony_ci component of the previous texture unit result scales the red, 1565bd8deadSopenharmony_ci green, and blue components of the unsigned RGBA texture 2D 1575bd8deadSopenharmony_ci access. 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ci 10. OFFSET_TEXTURE_RECTANGLE_NV - Similar to OFFSET_TEXTURE_2D_NV 1605bd8deadSopenharmony_ci except that the texture access is into a rectangular 1615bd8deadSopenharmony_ci non-projective texture. 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ci 11. OFFSET_TEXTURE_RECTANGLE_SCALE_NV - Similar to 1645bd8deadSopenharmony_ci OFFSET_TEXTURE_2D_SCALE_NV except that the texture access is 1655bd8deadSopenharmony_ci into a rectangular non-projective texture. 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ci <dependent textures> 1685bd8deadSopenharmony_ci 1695bd8deadSopenharmony_ci 12. DEPENDENT_AR_TEXTURE_2D_NV - Converts the alpha and red 1705bd8deadSopenharmony_ci components of a previous shader result into an (s,t) texture 1715bd8deadSopenharmony_ci coordinate set to access a 2D non-projective texture. 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ci 13. DEPENDENT_GB_TEXTURE_2D_NV - Converts the green and blue 1745bd8deadSopenharmony_ci components of a previous shader result into an (s,t) texture 1755bd8deadSopenharmony_ci coordinate set to access a 2D non-projective texture. 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ci <dot product textures> 1785bd8deadSopenharmony_ci 1795bd8deadSopenharmony_ci 14. DOT_PRODUCT_NV - Computes the dot product of the texture 1805bd8deadSopenharmony_ci shader's texture coordinate set (s,t,r) with some mapping of the 1815bd8deadSopenharmony_ci components of a previous texture shader result. The component 1825bd8deadSopenharmony_ci mapping depends on the type (RGBA or HILO) and signedness of 1835bd8deadSopenharmony_ci the stage's previous texture input. Other dot product texture 1845bd8deadSopenharmony_ci programs use the result of this program to compose a texture 1855bd8deadSopenharmony_ci coordinate set for a dependent texture access. The color result 1865bd8deadSopenharmony_ci is undefined. 1875bd8deadSopenharmony_ci 1885bd8deadSopenharmony_ci 15. DOT_PRODUCT_TEXTURE_2D_NV - When preceded by a DOT_PRODUCT_NV 1895bd8deadSopenharmony_ci program in the previous texture shader stage, computes a second 1905bd8deadSopenharmony_ci similar dot product and composes the two dot products into (s,t) 1915bd8deadSopenharmony_ci texture coordinate set to access a 2D non-projective texture. 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ci 16. DOT_PRODUCT_TEXTURE_RECTANGLE_NV - Similar to 1945bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_2D_NV except that the texture acces is into 1955bd8deadSopenharmony_ci a rectangular non-projective texture. 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci 17. DOT_PRODUCT_TEXTURE_CUBE_MAP_NV - When preceded by two 1985bd8deadSopenharmony_ci DOT_PRODUCT_NV programs in the previous two texture shader 1995bd8deadSopenharmony_ci stages, computes a third similar dot product and composes the 2005bd8deadSopenharmony_ci three dot products into (s,t,r) texture coordinate set to access 2015bd8deadSopenharmony_ci a cube map texture. 2025bd8deadSopenharmony_ci 2035bd8deadSopenharmony_ci 18. DOT_PRODUCT_REFLECT_CUBE_MAP_NV - When preceded by two 2045bd8deadSopenharmony_ci DOT_PRODUCT_NV programs in the previous two texture shader 2055bd8deadSopenharmony_ci stages, computes a third similar dot product and composes the 2065bd8deadSopenharmony_ci three dot products into a normal vector (Nx,Ny,Nz). An eye 2075bd8deadSopenharmony_ci vector (Ex,Ey,Ez) is composed from the q texture coordinates of 2085bd8deadSopenharmony_ci the three stages. A reflection vector (Rx,Ry,Rz) is computed 2095bd8deadSopenharmony_ci based on the normal and eye vectors. The reflection vector 2105bd8deadSopenharmony_ci forms an (s,t,r) texture coordinate set to access a cube map 2115bd8deadSopenharmony_ci texture. 2125bd8deadSopenharmony_ci 2135bd8deadSopenharmony_ci 19. DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV - Operates like 2145bd8deadSopenharmony_ci DOT_PRODUCT_REFLECT_CUBE_MAP_NV except that the eye vector 2155bd8deadSopenharmony_ci (Ex,Ey,Ez) is a user-defined constant rather than composed from 2165bd8deadSopenharmony_ci the q coordinates of the three stages. 2175bd8deadSopenharmony_ci 2185bd8deadSopenharmony_ci 20. DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV - When used instead of the second 2195bd8deadSopenharmony_ci DOT_PRODUCT_NV program preceding 2205bd8deadSopenharmony_ci a DOT_PRODUCT_REFLECT_CUBE_MAP_NV or 2215bd8deadSopenharmony_ci DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV stage, the normal 2225bd8deadSopenharmony_ci vector forms an (s,t,r) texture coordinate set to access a 2235bd8deadSopenharmony_ci cube map texture. 2245bd8deadSopenharmony_ci 2255bd8deadSopenharmony_ci <dot product depth replace> 2265bd8deadSopenharmony_ci 2275bd8deadSopenharmony_ci 21. DOT_PRODUCT_DEPTH_REPLACE_NV - When preceded by a DOT_PRODUCT_NV 2285bd8deadSopenharmony_ci program in the previous texture shader stage, computes a second 2295bd8deadSopenharmony_ci similar dot product and replaces the fragment's window-space 2305bd8deadSopenharmony_ci depth value with the first dot product results divided by 2315bd8deadSopenharmony_ci the second. The texture unit RGBA result is (0,0,0,0). 2325bd8deadSopenharmony_ci 2335bd8deadSopenharmony_ciIssues 2345bd8deadSopenharmony_ci 2355bd8deadSopenharmony_ci What should this extension be called? How does the functionality 2365bd8deadSopenharmony_ci compare with DirectX 8's pixel shaders? 2375bd8deadSopenharmony_ci 2385bd8deadSopenharmony_ci RESOLUTION: This extension is called NV_texture_shader. 2395bd8deadSopenharmony_ci 2405bd8deadSopenharmony_ci DirectX 8 refers to its similar functionality as "pixel shaders". 2415bd8deadSopenharmony_ci However, DirectX 8 lumps both the functionality described in this 2425bd8deadSopenharmony_ci extension and additional functionality similar to the functionality 2435bd8deadSopenharmony_ci in the NV_register_combiners extension together into what DirectX 2445bd8deadSopenharmony_ci 8 calls pixel shaders. This is confusing in two ways. 2455bd8deadSopenharmony_ci 2465bd8deadSopenharmony_ci 1) Pixels are not being shaded. In fact, the DirectX 8 pixel 2475bd8deadSopenharmony_ci shaders functionality is, taken as a whole, shading only 2485bd8deadSopenharmony_ci fragments (though Direct3D tends not to make the same 2495bd8deadSopenharmony_ci clear distinction between fragments and pixels that OpenGL 2505bd8deadSopenharmony_ci consistently makes). 2515bd8deadSopenharmony_ci 2525bd8deadSopenharmony_ci 2) There are two very distinct tasks being performed. 2535bd8deadSopenharmony_ci 2545bd8deadSopenharmony_ci First, there is the task of interpolated texture coordinate 2555bd8deadSopenharmony_ci mapping. This per-fragment task maps from interpolated 2565bd8deadSopenharmony_ci floating-point texture coordinate sets to (typically 2575bd8deadSopenharmony_ci fixed-point) texture unit RGBA results. In conventional OpenGL, 2585bd8deadSopenharmony_ci this mapping is performed by accessing the highest priority 2595bd8deadSopenharmony_ci enabled texture target using the fragment's corresponding 2605bd8deadSopenharmony_ci interpolated texture coordinate set. This NV_texture_shader 2615bd8deadSopenharmony_ci extension provides a significantly more powerful mechanism 2625bd8deadSopenharmony_ci for performing this mapping. 2635bd8deadSopenharmony_ci 2645bd8deadSopenharmony_ci Second, there is the task of fragment coloring. Fragment 2655bd8deadSopenharmony_ci coloring is process of combining (typically fixed-point) RGBA 2665bd8deadSopenharmony_ci colors to generate a final fragment color that, assuming the 2675bd8deadSopenharmony_ci fragment is not discarded by subsequent per-fragment tests, 2685bd8deadSopenharmony_ci is used to update the fragment's corresponding pixel in the 2695bd8deadSopenharmony_ci frame buffer. In conventional OpenGL, fragment coloring is 2705bd8deadSopenharmony_ci performed by the enabled texture environment functions, fog, and 2715bd8deadSopenharmony_ci color sum operations. NVIDIA's register combiners functionality 2725bd8deadSopenharmony_ci (see the NV_register_combiners and NV_register_combiners2 2735bd8deadSopenharmony_ci extensions) provides a substantially more powerful alternative 2745bd8deadSopenharmony_ci to conventional OpenGL fragment coloring. 2755bd8deadSopenharmony_ci 2765bd8deadSopenharmony_ci DirectX 8 has two types of opcodes for pixel shaders. Texture 2775bd8deadSopenharmony_ci address opcodes correspond to the first task listed above. Texture 2785bd8deadSopenharmony_ci register opcodes correspond to the second task listed above. 2795bd8deadSopenharmony_ci 2805bd8deadSopenharmony_ci NVIDIA OpenGL extensions maintain a clear distinction between 2815bd8deadSopenharmony_ci these two tasks. The texture shaders functionality described in 2825bd8deadSopenharmony_ci this specification corresponds to the first task listed above. 2835bd8deadSopenharmony_ci 2845bd8deadSopenharmony_ci Here is the conceptual framework that NVIDIA OpenGL extensions use 2855bd8deadSopenharmony_ci to describe shading: Shading is the process of assigning colors 2865bd8deadSopenharmony_ci to pixels, fragments, or texels. The texture shaders functionality 2875bd8deadSopenharmony_ci assigns colors to texture unit results (essentially texture 2885bd8deadSopenharmony_ci shading). These texture unit RGBA results can be used by fragment 2895bd8deadSopenharmony_ci coloring (fragment shading). The resulting fragments are used to 2905bd8deadSopenharmony_ci update pixels (pixel shading) possibly via blending and/or multiple 2915bd8deadSopenharmony_ci rendering passes. 2925bd8deadSopenharmony_ci 2935bd8deadSopenharmony_ci The goal of these individual shading operations is per-pixel 2945bd8deadSopenharmony_ci shading. Per-pixel shading is accomplished by combining the 2955bd8deadSopenharmony_ci texture shading, fragment shading, and pixel shading operations, 2965bd8deadSopenharmony_ci possibly with multiple rendering passes. 2975bd8deadSopenharmony_ci 2985bd8deadSopenharmony_ci Programmable shading is a style of per-pixel shading where the 2995bd8deadSopenharmony_ci shading operations are expressed in a higher level of abstraction 3005bd8deadSopenharmony_ci than "raw" OpenGL texture, fragment, and pixel shading operations. 3015bd8deadSopenharmony_ci In our view, programmable shading does not necessarily require a 3025bd8deadSopenharmony_ci "pixel program" to be downloaded and executed per-pixel by graphics 3035bd8deadSopenharmony_ci hardware. Indeed, there are many disadvantages to such an approach 3045bd8deadSopenharmony_ci in practice. An alternative view of programmable shading (the 3055bd8deadSopenharmony_ci one that we are promoting) treats the OpenGL primitive shading 3065bd8deadSopenharmony_ci operations as a SIMD machine and decomposes per-pixel shading 3075bd8deadSopenharmony_ci programs into one or more OpenGL rendering passes that map to "raw" 3085bd8deadSopenharmony_ci OpenGL shading operations. We believe that conventional OpenGL 3095bd8deadSopenharmony_ci combined with NV_register_combiners and NV_texture_shader (and 3105bd8deadSopenharmony_ci further augmented by programmable geometry via NV_vertex_program 3115bd8deadSopenharmony_ci and higher-order surfaces via NV_evaluators) can become the hardware 3125bd8deadSopenharmony_ci basis for a powerful programmable shading system. 3135bd8deadSopenharmony_ci 3145bd8deadSopenharmony_ci The roughly equivalent functionality to DirectX 8's pixel 3155bd8deadSopenharmony_ci shaders in OpenGL is the combination of NV_texture_shader with 3165bd8deadSopenharmony_ci NV_register_combiners. 3175bd8deadSopenharmony_ci 3185bd8deadSopenharmony_ci Is anyone working on programmable shading using the NV_texture_shader 3195bd8deadSopenharmony_ci functionality? 3205bd8deadSopenharmony_ci 3215bd8deadSopenharmony_ci Yes. The Stanford Shading Group is actively working on 3225bd8deadSopenharmony_ci support for programmable shading using NV_texture_shader, 3235bd8deadSopenharmony_ci NV_register_combiners, and other extensions as the hardware basis 3245bd8deadSopenharmony_ci for such a system. 3255bd8deadSopenharmony_ci 3265bd8deadSopenharmony_ci What terms are important to this specification? 3275bd8deadSopenharmony_ci 3285bd8deadSopenharmony_ci texture shaders - A series of texture shader stages that map texture 3295bd8deadSopenharmony_ci coordinate sets to texture unit RGBA results. An alternative to 3305bd8deadSopenharmony_ci conventional OpenGL texturing. 3315bd8deadSopenharmony_ci 3325bd8deadSopenharmony_ci texture coordinate set - The interpolated (s,t,r,q) value for a 3335bd8deadSopenharmony_ci particular texture unit of a particular fragment. 3345bd8deadSopenharmony_ci 3355bd8deadSopenharmony_ci conventional OpenGL texturing - The conventional mechanism used by 3365bd8deadSopenharmony_ci OpenGL to map texture coordinate sets to texture unit RGBA results 3375bd8deadSopenharmony_ci whereby a given texture unit's texture coordinate set is used to 3385bd8deadSopenharmony_ci access the highest priority enabled texture target to generate 3395bd8deadSopenharmony_ci the texture unit's RGBA result. Conventional OpenGL texturing 3405bd8deadSopenharmony_ci supports 1D, 2D, 3D, and cube map texture targets. In conventional 3415bd8deadSopenharmony_ci OpenGL texturing each texture unit operates independently. 3425bd8deadSopenharmony_ci 3435bd8deadSopenharmony_ci texture target type - One of the four texture target types: 1D, 2D, 3445bd8deadSopenharmony_ci 3D, and cube map. (Note that NV_texture_shader does NOT provide 3455bd8deadSopenharmony_ci support for 3D textures; the NV_texture_shader2 extension adds 3465bd8deadSopenharmony_ci texture shader operations for 3D texture targets.) 3475bd8deadSopenharmony_ci 3485bd8deadSopenharmony_ci texture internal format - The internal format of a particular 3495bd8deadSopenharmony_ci texture object. For example, GL_RGBA8, GL_SIGNED_RGBA8, or 3505bd8deadSopenharmony_ci GL_SIGNED_HILO16_NV. 3515bd8deadSopenharmony_ci 3525bd8deadSopenharmony_ci texture format type - One of the three texture format types: RGBA, 3535bd8deadSopenharmony_ci HILO, or texture offset group. 3545bd8deadSopenharmony_ci 3555bd8deadSopenharmony_ci texture component signedness - Whether or not a given component 3565bd8deadSopenharmony_ci of a texture's texture internal format is signed or not. 3575bd8deadSopenharmony_ci Signed components are clamped to the range [-1,1] while unsigned 3585bd8deadSopenharmony_ci components are clamped to the range [0,1]. 3595bd8deadSopenharmony_ci 3605bd8deadSopenharmony_ci texture shader enable - The OpenGL enable that determines whether 3615bd8deadSopenharmony_ci the texture shader functionality (if enabled) or conventional 3625bd8deadSopenharmony_ci OpenGL texturing functionality (if disabled) is used to map texture 3635bd8deadSopenharmony_ci coordinate sets to texture unit RGBA results. The enable's initial 3645bd8deadSopenharmony_ci state is disabled. 3655bd8deadSopenharmony_ci 3665bd8deadSopenharmony_ci texture shader stage - Each texture unit has a corresponding texture 3675bd8deadSopenharmony_ci shader stage that can be loaded with one of 21 texture shader 3685bd8deadSopenharmony_ci operations. Depending on the stage's texture shader operation, 3695bd8deadSopenharmony_ci a texture shader stage uses the texture unit's corresponding 3705bd8deadSopenharmony_ci texture coordinate set and other state including the texture shader 3715bd8deadSopenharmony_ci results of previous texture shader stages to generate the stage's 3725bd8deadSopenharmony_ci particular texture shader result and texture unit RGBA result. 3735bd8deadSopenharmony_ci 3745bd8deadSopenharmony_ci texture unit RGBA result - A (typically fixed-point) color result 3755bd8deadSopenharmony_ci generated by either a texture shader or conventional OpenGL 3765bd8deadSopenharmony_ci texturing. This is the color that becomes the texture unit's 3775bd8deadSopenharmony_ci texture environment function texture input or the initial value 3785bd8deadSopenharmony_ci of the texture unit's corresponding texture register in the case 3795bd8deadSopenharmony_ci of register combiners. 3805bd8deadSopenharmony_ci 3815bd8deadSopenharmony_ci texture shader result - The result of a texture shader stage that 3825bd8deadSopenharmony_ci may be used as an input to a subsequent texture shader stage. 3835bd8deadSopenharmony_ci This result is distinct from the texture unit RGBA result. 3845bd8deadSopenharmony_ci The texture shader result may be one of four types: an RGBA 3855bd8deadSopenharmony_ci color value, a HILO value, a texture offset group value, or a 3865bd8deadSopenharmony_ci floating-point value. A few texture shader operations are defined 3875bd8deadSopenharmony_ci to always generate an invalid texture shader result. 3885bd8deadSopenharmony_ci 3895bd8deadSopenharmony_ci texture shader result type - One of the four texture shader result 3905bd8deadSopenharmony_ci types: RGBA color, HILO, texture offset group, or floating-point. 3915bd8deadSopenharmony_ci 3925bd8deadSopenharmony_ci texture shader operation - One of 21 fixed programs that maps a 3935bd8deadSopenharmony_ci texture unit's texture coordinate set to a texture shader result 3945bd8deadSopenharmony_ci and a texture unit RGBA result. 3955bd8deadSopenharmony_ci 3965bd8deadSopenharmony_ci texture consistency - Whether or not the texture object for a 3975bd8deadSopenharmony_ci given texture target is consistent. The rules for determining 3985bd8deadSopenharmony_ci consistency depend on the texture target and the texture object's 3995bd8deadSopenharmony_ci filtering state. For example, a mipmapped texture is inconsistent 4005bd8deadSopenharmony_ci if its texture levels do not form a consistent mipmap pyramid. 4015bd8deadSopenharmony_ci Also, a cube map texture is inconsistent if its (filterable) 4025bd8deadSopenharmony_ci matching cube map faces do not have matching dimensions. 4035bd8deadSopenharmony_ci 4045bd8deadSopenharmony_ci texture shader stage consistency - Whether or not a texture 4055bd8deadSopenharmony_ci shader stage is consistent or not. The rules for determining 4065bd8deadSopenharmony_ci texture shader stage consistency depend on the texture shader 4075bd8deadSopenharmony_ci stage operation and the inputs upon which the texture shader 4085bd8deadSopenharmony_ci operation depends. For example, texture shader operations that 4095bd8deadSopenharmony_ci depend on accessing a given texture target are not consistent 4105bd8deadSopenharmony_ci if the given texture target is not consistent. Also, a texture 4115bd8deadSopenharmony_ci shader operation that depends on a particular texture shader 4125bd8deadSopenharmony_ci result type for a previous texture shader result is not consistent 4135bd8deadSopenharmony_ci if the previous texture shader result type is not appropriate 4145bd8deadSopenharmony_ci or the previous texture shader stage itself is not consistent. 4155bd8deadSopenharmony_ci If a texture shader stage is not consistent, it operates as if 4165bd8deadSopenharmony_ci the operation is the GL_NONE operation. 4175bd8deadSopenharmony_ci 4185bd8deadSopenharmony_ci previous texture input - Some texture shader operations depend 4195bd8deadSopenharmony_ci on a texture shader result from a specific previous texture input 4205bd8deadSopenharmony_ci designated by the GL_PREVIOUS_TEXTURE_INPUT_NV state. 4215bd8deadSopenharmony_ci 4225bd8deadSopenharmony_ci What should the default state be? 4235bd8deadSopenharmony_ci 4245bd8deadSopenharmony_ci RESOLUTION: Texture shaders disabled with all stages set to GL_NONE. 4255bd8deadSopenharmony_ci 4265bd8deadSopenharmony_ci How is the mipmap lambda parameter computed for dependent texture fetches? 4275bd8deadSopenharmony_ci 4285bd8deadSopenharmony_ci RESOLUTION: Very carefully. NVIDIA's implementation details are 4295bd8deadSopenharmony_ci NVIDIA proprietary, but mipmapping of dependent texture fetches 4305bd8deadSopenharmony_ci is supported. 4315bd8deadSopenharmony_ci 4325bd8deadSopenharmony_ci Does this extension support so-called "bump environment mapping"? 4335bd8deadSopenharmony_ci 4345bd8deadSopenharmony_ci Something similar to DirectX 6 so-called bump environment mapping 4355bd8deadSopenharmony_ci can be emulated with the GL_OFFSET_TEXTURE_2D_NV texture shader. 4365bd8deadSopenharmony_ci 4375bd8deadSopenharmony_ci A more correct form of bump environment mapping can be implemented 4385bd8deadSopenharmony_ci by using the following texture shaders: 4395bd8deadSopenharmony_ci 4405bd8deadSopenharmony_ci texture unit 0: GL_TEXTURE_2D 4415bd8deadSopenharmony_ci texture unit 1: GL_DOT_PRODUCT_NV 4425bd8deadSopenharmony_ci texture unit 2: GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 4435bd8deadSopenharmony_ci texture unit 3: GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 4445bd8deadSopenharmony_ci 4455bd8deadSopenharmony_ci Texture unit 0 should use a normal map for its 2D texture. 4465bd8deadSopenharmony_ci A GL_SIGNED_RGB texture can encode signed tangent-space normal 4475bd8deadSopenharmony_ci perturbations. Or for more precision, a GL_SIGNED_HILO_NV texture 4485bd8deadSopenharmony_ci can encode the normal perturbations in hemisphere fashion. 4495bd8deadSopenharmony_ci 4505bd8deadSopenharmony_ci The tangent (Tx,Ty,Tz), binormal (Bx,By,Bz), and normal (Nx,Ny,Nz) 4515bd8deadSopenharmony_ci that together map tangent-space normals to cube map-space normals 4525bd8deadSopenharmony_ci should be sent as texture coordinates s1, t1, r1, s2, t2, r2, s3, 4535bd8deadSopenharmony_ci t3, and r3 respectively. Typically, cube map space is aligned to 4545bd8deadSopenharmony_ci match world space. 4555bd8deadSopenharmony_ci 4565bd8deadSopenharmony_ci The (unnormalized) cube map-space eye vector (Ex,Ey,Ez) should be 4575bd8deadSopenharmony_ci sent as texture coordinates q1, q2, and q3 respectively. 4585bd8deadSopenharmony_ci 4595bd8deadSopenharmony_ci A vertex programs (using the NV_vertex_program extension) can 4605bd8deadSopenharmony_ci compute and assign the required tangent, binormal, normal, and 4615bd8deadSopenharmony_ci eye vectors to the appropriate texture coordinates. Conventional 4625bd8deadSopenharmony_ci OpenGL evaluators (or the NV_evaluators extension) can be used to 4635bd8deadSopenharmony_ci evaluate the tangent and normal automatically for Bezier patches. 4645bd8deadSopenharmony_ci The binormal is the cross product of the normal and tangent. 4655bd8deadSopenharmony_ci 4665bd8deadSopenharmony_ci Texture units 1, 2, and 3, should also all specify GL_TEXTURE0_ARB 4675bd8deadSopenharmony_ci (the texture unit accessing the normal map) for their 4685bd8deadSopenharmony_ci GL_PREVIOUS_TEXTURE_INPUT_NV parameter. 4695bd8deadSopenharmony_ci 4705bd8deadSopenharmony_ci The three dot product texture shader operations performed by the 4715bd8deadSopenharmony_ci texture shaders for texture units 1, 2, and 3 form a 3x3 matrix 4725bd8deadSopenharmony_ci that transforms the tangent-space normal (the result of the texture 4735bd8deadSopenharmony_ci shader for texture unit 0). This rotates the tangent-space normal 4745bd8deadSopenharmony_ci into a cube map-space. 4755bd8deadSopenharmony_ci 4765bd8deadSopenharmony_ci Texture unit 2's cube map texture should encode a pre-computed 4775bd8deadSopenharmony_ci diffuse lighting solution. Texture unit 3's cube map texture should 4785bd8deadSopenharmony_ci encode a pre-computed specular lighting solution. The specular 4795bd8deadSopenharmony_ci lighting solution can be an environment map. 4805bd8deadSopenharmony_ci 4815bd8deadSopenharmony_ci Texture unit 2 is accessed using the cube map-space normal 4825bd8deadSopenharmony_ci vector resulting from the three dot product results 4835bd8deadSopenharmony_ci of the texture shaders for texture units 1, 2, and 3. 4845bd8deadSopenharmony_ci (While normally texture shader operations are executed 4855bd8deadSopenharmony_ci in order, preceding GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV by 4865bd8deadSopenharmony_ci GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV is a special case where a dot 4875bd8deadSopenharmony_ci product result from texture unit 3 influences the cube map access 4885bd8deadSopenharmony_ci of texture unit 2.) 4895bd8deadSopenharmony_ci 4905bd8deadSopenharmony_ci Texture unit 3 is accessed using the cube map-space reflection 4915bd8deadSopenharmony_ci vector computed using the cube map-space normal vector from the 4925bd8deadSopenharmony_ci three dot product results of the texture shaders for texture units 4935bd8deadSopenharmony_ci 1, 2, and 3 and the cube-map space eye-vector (q1,q2,q3). 4945bd8deadSopenharmony_ci 4955bd8deadSopenharmony_ci Note that using cube maps to access the diffuse and specular 4965bd8deadSopenharmony_ci illumination obviates the need for an explicit normalization of 4975bd8deadSopenharmony_ci the typically unnormalized cube map-space normal and reflection 4985bd8deadSopenharmony_ci vectors. 4995bd8deadSopenharmony_ci 5005bd8deadSopenharmony_ci The register combiners (using the NV_register_combiners extension) 5015bd8deadSopenharmony_ci can combine the diffuse and specular contribution available in 5025bd8deadSopenharmony_ci the GL_TEXTURE2_ARB and GL_TEXTURE3_ARB registers respectively. 5035bd8deadSopenharmony_ci A constant ambient contribution can be stored in a register combiner 5045bd8deadSopenharmony_ci constant. The ambient contribution could also be folded into the 5055bd8deadSopenharmony_ci diffuse cube map. 5065bd8deadSopenharmony_ci 5075bd8deadSopenharmony_ci If desired, the diffuse and ambient contribution can be modulated 5085bd8deadSopenharmony_ci by a diffuse material parameter encoded in the RGB components of 5095bd8deadSopenharmony_ci the primary color. 5105bd8deadSopenharmony_ci 5115bd8deadSopenharmony_ci If desired, the specular contribution can be modulated by a specular 5125bd8deadSopenharmony_ci material parameter encoded in the RGB components of the secondary 5135bd8deadSopenharmony_ci color. 5145bd8deadSopenharmony_ci 5155bd8deadSopenharmony_ci Yes, this is all quite complicated, but the result is a true 5165bd8deadSopenharmony_ci bump environment mapping technique with excellent accounting for 5175bd8deadSopenharmony_ci normalization and per-vertex interpolated diffuse and specular 5185bd8deadSopenharmony_ci materials. An environment and/or an arbitrary number of distant 5195bd8deadSopenharmony_ci or infinite lights can be encoded into the diffuse and specular 5205bd8deadSopenharmony_ci cube maps. 5215bd8deadSopenharmony_ci 5225bd8deadSopenharmony_ci Why must GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV be used only in 5235bd8deadSopenharmony_ci conjunction with GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV? Why does the 5245bd8deadSopenharmony_ci GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV stage rely on a result computed 5255bd8deadSopenharmony_ci in the following stage? 5265bd8deadSopenharmony_ci 5275bd8deadSopenharmony_ci Think of the GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV and 5285bd8deadSopenharmony_ci GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV operations as forming a compound 5295bd8deadSopenharmony_ci operation. The idea is to generate two cube map accesses based 5305bd8deadSopenharmony_ci on a perturbed normal and reflection vector where the reflection 5315bd8deadSopenharmony_ci vector is a function of the perturbed normal vector. To minimize 5325bd8deadSopenharmony_ci the number of stages (three stages only) and reuse the internal 5335bd8deadSopenharmony_ci computations involved, this is treated as a compound operation. 5345bd8deadSopenharmony_ci 5355bd8deadSopenharmony_ci Note that the GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 5365bd8deadSopenharmony_ci vector can be preceded by two GL_DOT_PRODUCT_NV 5375bd8deadSopenharmony_ci operations instead of a GL_DOT_PRODUCT_NV operation then a 5385bd8deadSopenharmony_ci GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV operation. This may be more 5395bd8deadSopenharmony_ci efficient when only the cube map access using the reflection vector 5405bd8deadSopenharmony_ci is required (a shiny object without any diffuse reflectance). 5415bd8deadSopenharmony_ci 5425bd8deadSopenharmony_ci Also note that if only the diffuse reflectance cube map 5435bd8deadSopenharmony_ci access is required, this can be accomplished by simply using 5445bd8deadSopenharmony_ci the GL_DOT_PRODUCT_CUBE_MAP_NV operation preceded by two 5455bd8deadSopenharmony_ci GL_DOT_PRODUCT_NV operations. 5465bd8deadSopenharmony_ci 5475bd8deadSopenharmony_ci How do texture shader stages map to register combiner texture registers? 5485bd8deadSopenharmony_ci 5495bd8deadSopenharmony_ci RESOLUTION: If GL_TEXTURE_SHADER_NV is enabled, the texture unit 5505bd8deadSopenharmony_ci RGBA result for a each texture stage is used to initialize the 5515bd8deadSopenharmony_ci respective texture register in the register combiners. 5525bd8deadSopenharmony_ci 5535bd8deadSopenharmony_ci So if a texture shader generates a texture unit RGBA result for 5545bd8deadSopenharmony_ci texture unit 2, use GL_TEXTURE2_ARB for the name of the register 5555bd8deadSopenharmony_ci value in register combiners. 5565bd8deadSopenharmony_ci 5575bd8deadSopenharmony_ci Should the number of shader stages be settable? 5585bd8deadSopenharmony_ci 5595bd8deadSopenharmony_ci RESOLUTION: No, unused stages can be set to GL_NONE. 5605bd8deadSopenharmony_ci 5615bd8deadSopenharmony_ci How do signed RGBA texture components show up in the register 5625bd8deadSopenharmony_ci combiners texture registers? 5635bd8deadSopenharmony_ci 5645bd8deadSopenharmony_ci RESOLUTION: As signed values. You can use GL_SIGNED_IDENTITY_NV 5655bd8deadSopenharmony_ci and get to the signed value directly. 5665bd8deadSopenharmony_ci 5675bd8deadSopenharmony_ci How does the texture unit RGBA result of a 5685bd8deadSopenharmony_ci GL_NONE, GL_CULL_FRAGMENT_NV, DOT_PRODUCT_NV, or 5695bd8deadSopenharmony_ci GL_DOT_PRODUCT_DEPTH_REPLACE_NV texture shader operation show up in 5705bd8deadSopenharmony_ci the register combiners texture registers? 5715bd8deadSopenharmony_ci 5725bd8deadSopenharmony_ci RESOLUTION: Always as the value (0,0,0,0). 5735bd8deadSopenharmony_ci 5745bd8deadSopenharmony_ci How the texture RGBA result of the GL_NONE, GL_CULL_FRAGMENT_NV, 5755bd8deadSopenharmony_ci GL_DOT_PRODUCT_NV, and GL_DOT_PRODUCT_DEPTH_REPLACE_NV texture 5765bd8deadSopenharmony_ci shader operations shows up in the texture environment is not 5775bd8deadSopenharmony_ci an issue, because the texture environment operation is always 5785bd8deadSopenharmony_ci assumed to be GL_NONE when the corresponding texture shader 5795bd8deadSopenharmony_ci is one of GL_NONE, GL_CULL_FRAGMENT_NV, GL_DOT_PRODUCT_NV, or 5805bd8deadSopenharmony_ci GL_DOT_PRODUCT_DEPTH_REPLACE_NV when GL_TEXTURE_SHADER_NV is 5815bd8deadSopenharmony_ci enabled. 5825bd8deadSopenharmony_ci 5835bd8deadSopenharmony_ci Why introduce new pixel groups (the HILO and texture offset groups)? 5845bd8deadSopenharmony_ci 5855bd8deadSopenharmony_ci RESOLUTION: In core OpenGL, texture image data is transferred and 5865bd8deadSopenharmony_ci stored as sets of color components. Such color data can always 5875bd8deadSopenharmony_ci be promoted to RGBA data. 5885bd8deadSopenharmony_ci 5895bd8deadSopenharmony_ci In addition to color components, there are other types of image 5905bd8deadSopenharmony_ci data in OpenGL including depth components, stencil components, 5915bd8deadSopenharmony_ci and color indices. Depth and stencil components can be used by 5925bd8deadSopenharmony_ci glReadPixels, glDrawPixels, and glCopyPixels, but are not useful 5935bd8deadSopenharmony_ci for storing texture data in core OpenGL. The EXT_paletted_texture 5945bd8deadSopenharmony_ci and EXT_index_texture extensions extend the contents of textures to 5955bd8deadSopenharmony_ci include indices (even though in the case of EXT_paletted_texture, 5965bd8deadSopenharmony_ci texel fetches are always eventually expanded into color components 5975bd8deadSopenharmony_ci by the texture palette). 5985bd8deadSopenharmony_ci 5995bd8deadSopenharmony_ci However this these existing pixel groups are not sufficient for 6005bd8deadSopenharmony_ci all the texture shader operations introduced by this extension. 6015bd8deadSopenharmony_ci Certain texture shader operations require texture data that 6025bd8deadSopenharmony_ci is not merely a set of color components. The dot product 6035bd8deadSopenharmony_ci (GL_DOT_PRODUCT_NV, etc) operations both can 6045bd8deadSopenharmony_ci utilize high-precision hi and lo components. The 6055bd8deadSopenharmony_ci offset texture operations (GL_OFFSET_TEXTURE_2D_NV, 6065bd8deadSopenharmony_ci GL_OFFSET_TEXTURE_2D_SCALE_NV, GL_OFFSET_TEXTURE_RECTANGLE_NV, 6075bd8deadSopenharmony_ci and GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV) require 6085bd8deadSopenharmony_ci textures containing signed offsets used to displace 6095bd8deadSopenharmony_ci texture coordinates. The GL_OFFSET_TEXTURE_2D_SCALE_NV and 6105bd8deadSopenharmony_ci GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV also require an unsigned 6115bd8deadSopenharmony_ci magnitude for the scaling operation. 6125bd8deadSopenharmony_ci 6135bd8deadSopenharmony_ci To facilitate these new texture representations, this extension 6145bd8deadSopenharmony_ci introduces several new (external) formats, pixel groups, and 6155bd8deadSopenharmony_ci internal texture formats. An (external) format is the external 6165bd8deadSopenharmony_ci representation used by an application to specify pixel data 6175bd8deadSopenharmony_ci for use by OpenGL. A pixel group is a grouping of components 6185bd8deadSopenharmony_ci that are transformed by OpenGL's pixel transfer mechanism is a 6195bd8deadSopenharmony_ci particular manner. For example, RGBA components for colors are 6205bd8deadSopenharmony_ci transformed differently than stencil components when passed through 6215bd8deadSopenharmony_ci OpenGL's pixel transfer mechanism. An internal texture format is 6225bd8deadSopenharmony_ci the representation of texture data within OpenGL. Note that the 6235bd8deadSopenharmony_ci (external) format used to specify the data by the application may 6245bd8deadSopenharmony_ci be different than the internal texture format used to store the 6255bd8deadSopenharmony_ci texture data internally to OpenGL. For example, core OpenGL permits 6265bd8deadSopenharmony_ci an application to specify data for a texture as GL_LUMINANCE_ALPHA 6275bd8deadSopenharmony_ci data stored in GLfloats even though the data is to be store in 6285bd8deadSopenharmony_ci a GL_RGBA8 texture. OpenGL's pixel unpacking and pixel transfer 6295bd8deadSopenharmony_ci operations perform an appropriate transformation of the data when 6305bd8deadSopenharmony_ci such a texture download is performed. Also note that data from 6315bd8deadSopenharmony_ci one pixel group (say stencil components) cannot be supplied as 6325bd8deadSopenharmony_ci data for a different pixel group (say RGBA components). 6335bd8deadSopenharmony_ci 6345bd8deadSopenharmony_ci This extension introduces four new (external) formats for 6355bd8deadSopenharmony_ci texture data: GL_HILO_NV, GL_DSDT_NV, GL_DSDT_MAG_NV, and 6365bd8deadSopenharmony_ci GL_DSDT_MAG_VIB_NV. 6375bd8deadSopenharmony_ci 6385bd8deadSopenharmony_ci GL_HILO_NV is for specifying high-precision hi and lo components. 6395bd8deadSopenharmony_ci The other three formats are used to specify texture offset groups. 6405bd8deadSopenharmony_ci These new formats can only be used for specifying textures (not 6415bd8deadSopenharmony_ci copying, reading, or writing pixels). 6425bd8deadSopenharmony_ci 6435bd8deadSopenharmony_ci Each of these four pixel formats belong to one of two pixel groups. 6445bd8deadSopenharmony_ci Pixels specified with the GL_HILO_NV format are transformed as HILO 6455bd8deadSopenharmony_ci components. Pixels specified with the DSDT_NV, DSDT_MAG_NV, and 6465bd8deadSopenharmony_ci DSDT_MAG_VIB_NV formats are transformed as texture offset groups. 6475bd8deadSopenharmony_ci 6485bd8deadSopenharmony_ci The HILO component and texture offset group pixel groups have 6495bd8deadSopenharmony_ci independent scale and bias operations for each component type. 6505bd8deadSopenharmony_ci Various pixel transfer operations that are performed on the RGBA 6515bd8deadSopenharmony_ci components pixel group are NOT performed on these two new pixel 6525bd8deadSopenharmony_ci groups. OpenGL's pixel map, color table, convolution, color matrix, 6535bd8deadSopenharmony_ci histogram, and min/max are NOT performed on the HILO components 6545bd8deadSopenharmony_ci or texture offset group pixel groups. 6555bd8deadSopenharmony_ci 6565bd8deadSopenharmony_ci There are four internal texture formats for texture data specified 6575bd8deadSopenharmony_ci as HILO components: GL_HILO_NV, GL_HILO16_NV, GL_SIGNED_HILO_NV, 6585bd8deadSopenharmony_ci and GL_SIGNED_HILO16_NV. The HILO data can be stored as either 6595bd8deadSopenharmony_ci unsigned [0,1] value or [-1,1] signed values. There are also 6605bd8deadSopenharmony_ci enumerants for both explicitly sized component precision (16-bit 6615bd8deadSopenharmony_ci components) and unsized component precision. OpenGL implementations 6625bd8deadSopenharmony_ci are expected to keep HILO components are high precision even if 6635bd8deadSopenharmony_ci an unsized internal texture format is used. 6645bd8deadSopenharmony_ci 6655bd8deadSopenharmony_ci The expectation with HILO textures is that applications will 6665bd8deadSopenharmony_ci specify HILO data using a type of GL_UNSIGNED_SHORT or GL_SHORT or 6675bd8deadSopenharmony_ci larger data types. Specifying HILO data with GL_UNSIGNED_BYTE or 6685bd8deadSopenharmony_ci GL_BYTE works but does not exploit the full available precision 6695bd8deadSopenharmony_ci of the HILO internal texture formats. 6705bd8deadSopenharmony_ci 6715bd8deadSopenharmony_ci There are six internal texture formats for texture data 6725bd8deadSopenharmony_ci specified as texture offset groups: GL_DSDT_NV, GL_DSDT8_NV, 6735bd8deadSopenharmony_ci GL_DSDT_MAG_NV, GL_DSDT8_MAG8_NV, GL_DSDT_MAG_INTENSITY_NV and 6745bd8deadSopenharmony_ci GL_DSDT8_MAG8_INTENSITY8_NV. The GL_DSDT_NV formats specify two 6755bd8deadSopenharmony_ci signed [-1,1] components, ds and dt, used to offset s and t texture 6765bd8deadSopenharmony_ci coordinates. The GL_DSDT_MAG_NV formats specify an additional 6775bd8deadSopenharmony_ci third unsigned [0,1] component that is a magnitude to scale an 6785bd8deadSopenharmony_ci unsigned RGBA texture fetch by. The GL_DSDT_MAG_INTENSITY_NV 6795bd8deadSopenharmony_ci formats specify an additional fourth [0,1] unsigned component, 6805bd8deadSopenharmony_ci intensity, that becomes the intensity of the fetched texture for 6815bd8deadSopenharmony_ci use in the texture environment or register combiners. There are 6825bd8deadSopenharmony_ci also enumerants for both explicitly sized (8-bit components) 6835bd8deadSopenharmony_ci and unsized component precision. 6845bd8deadSopenharmony_ci 6855bd8deadSopenharmony_ci Note that the vibrance (VIB) component of the 6865bd8deadSopenharmony_ci GL_DSDT_MAG_VIB_NV format becomes the intensity component of 6875bd8deadSopenharmony_ci the GL_DSDT_MAG_INTENSITY_NV internal texture format. Vibrance 6885bd8deadSopenharmony_ci becomes intensity in the GL_DSDT_MAG_INTENSITY_NV texture format. 6895bd8deadSopenharmony_ci The introduction of vibrance is because core OpenGL has no notion 6905bd8deadSopenharmony_ci of an intensity component in the pixel transfer mechanism or as 6915bd8deadSopenharmony_ci an external format (instead the red component of an RGBA value 6925bd8deadSopenharmony_ci becomes the intensity component of intensity textures). 6935bd8deadSopenharmony_ci 6945bd8deadSopenharmony_ci How does the texture unit RGBA result of a texture shader that fetches 6955bd8deadSopenharmony_ci a texture with a base internal format of GL_HILO_NV, GL_DSDT_NV, or 6965bd8deadSopenharmony_ci GL_DSDT_MAG_NV show up in the register combiners texture registers? 6975bd8deadSopenharmony_ci 6985bd8deadSopenharmony_ci RESOLUTION: Always as the value (0,0,0,0). 6995bd8deadSopenharmony_ci 7005bd8deadSopenharmony_ci How the texture RGBA result of a texture shader that fetches a 7015bd8deadSopenharmony_ci texture with a base internal format of GL_HILO_NV, GL_DSDT_NV, 7025bd8deadSopenharmony_ci or GL_DSDT_MAG_NV the GL_DOT_PRODUCT_NV texture shader shows up 7035bd8deadSopenharmony_ci in the texture environment is not an issue, because the texture 7045bd8deadSopenharmony_ci environment operation is always assumed to be GL_NONE in this case 7055bd8deadSopenharmony_ci when GL_TEXTURE_SHADER_NV is enabled. 7065bd8deadSopenharmony_ci 7075bd8deadSopenharmony_ci Does the GL_DOT_PRODUCT_DEPTH_REPLACE_NV program replace the 7085bd8deadSopenharmony_ci eye-distance Z or window-space depth? 7095bd8deadSopenharmony_ci 7105bd8deadSopenharmony_ci RESOLUTION: Window-space depth. And if the window-space depth 7115bd8deadSopenharmony_ci value is outside of the near and far depth range values, the 7125bd8deadSopenharmony_ci fragment is rejected. 7135bd8deadSopenharmony_ci 7145bd8deadSopenharmony_ci The GL_CULL_FRAGMENT_NV operation always compares against all four 7155bd8deadSopenharmony_ci texture coordinates. What if I want only one, two, or three 7165bd8deadSopenharmony_ci comparisons? 7175bd8deadSopenharmony_ci 7185bd8deadSopenharmony_ci RESOLUTION: To compare against a single value, replicate that value 7195bd8deadSopenharmony_ci in all the coordinates and set the comparison for all components to 7205bd8deadSopenharmony_ci be identical. Or you can set uninteresting coordinates to zero and 7215bd8deadSopenharmony_ci use the GL_GEQUAL comparison which will never cull for the value zero. 7225bd8deadSopenharmony_ci 7235bd8deadSopenharmony_ci What is GL_CULL_FRAGMENT_NV good for? 7245bd8deadSopenharmony_ci 7255bd8deadSopenharmony_ci The GL_CULL_FRAGMENT_NV operation provides a mechanism to implement 7265bd8deadSopenharmony_ci per-fragment clip planes. If a texture coordinate is assigned a 7275bd8deadSopenharmony_ci signed distance to a plane, the cull fragment test can discard 7285bd8deadSopenharmony_ci fragments on the wrong side of the plane. Each texture shader 7295bd8deadSopenharmony_ci stage provides up to four such clip planes. An eye-space clip 7305bd8deadSopenharmony_ci plane can be established using the GL_EYE_LINEAR texture coordinate 7315bd8deadSopenharmony_ci generation mode where the clip plane equation is specified via 7325bd8deadSopenharmony_ci the GL_EYE_PLANE state. 7335bd8deadSopenharmony_ci 7345bd8deadSopenharmony_ci Clip planes are one application for GL_CULL_FRAGMENT_NV, but 7355bd8deadSopenharmony_ci other clipping approaches are possible too. For example, by 7365bd8deadSopenharmony_ci computing and assigning appropriate texture coordinates (perhaps 7375bd8deadSopenharmony_ci with NV_vertex_program), fragments beyond a certain distance from 7385bd8deadSopenharmony_ci a point can be culled (assuming that it is acceptable to linearly 7395bd8deadSopenharmony_ci interpolate a distance between vertices). 7405bd8deadSopenharmony_ci 7415bd8deadSopenharmony_ci The texture border color is supposed to be an RGBA value clamped to 7425bd8deadSopenharmony_ci the range [0,1]. How does the texture border color work in conjunction 7435bd8deadSopenharmony_ci with signed RGBA color components, HILO components, and texture offset 7445bd8deadSopenharmony_ci component groups? 7455bd8deadSopenharmony_ci 7465bd8deadSopenharmony_ci RESOLUTION: The per-texture object GL_TEXTURE_BORDER_COLOR 7475bd8deadSopenharmony_ci is superceded by a GL_TEXTURE_BORDER_VALUES symbolic token. 7485bd8deadSopenharmony_ci The texture border values are four floats (not clamped to 7495bd8deadSopenharmony_ci [0,1] when specified). When a texture border is required for 7505bd8deadSopenharmony_ci a texture, the components for the border texel are determined 7515bd8deadSopenharmony_ci by the GL_TEXTURE_BORDER_VALUES state. For color components, 7525bd8deadSopenharmony_ci the GL_TEXTURE_BORDER_VALUES state is treated as a set of RGBA 7535bd8deadSopenharmony_ci color components. For HILO components, the first value is treated 7545bd8deadSopenharmony_ci as hi and the second value is treated as lo. For texture offset 7555bd8deadSopenharmony_ci components, the ds, dt, mag, and vib values correspond to the first, 7565bd8deadSopenharmony_ci second, third, and fourth texture border values respectively. 7575bd8deadSopenharmony_ci The particular texture border components are clamped to the range 7585bd8deadSopenharmony_ci of the component determined by the texture's internal format. So a 7595bd8deadSopenharmony_ci signed component is clamped to the [-1,1] range and an unsigned 7605bd8deadSopenharmony_ci component is clamped to the [0,1] range. 7615bd8deadSopenharmony_ci 7625bd8deadSopenharmony_ci For backward compatibility, the GL_TEXTURE_BORDER_COLOR can 7635bd8deadSopenharmony_ci still be specified and queried. When specified, the values are 7645bd8deadSopenharmony_ci clamped to [0,1] and used to update the texture border values. 7655bd8deadSopenharmony_ci When GL_TEXTURE_BORDER_COLOR is queried, there is no clamping of 7665bd8deadSopenharmony_ci the returned values. 7675bd8deadSopenharmony_ci 7685bd8deadSopenharmony_ci With signed texture components, does the texture environment function 7695bd8deadSopenharmony_ci discussion need to be amended? 7705bd8deadSopenharmony_ci 7715bd8deadSopenharmony_ci RESOLUTION: Yes. We do not want texture environment results to 7725bd8deadSopenharmony_ci exceed the range [-1,1]. 7735bd8deadSopenharmony_ci 7745bd8deadSopenharmony_ci The GL_DECAL and GL_BLEND operations perform linear interpolations 7755bd8deadSopenharmony_ci of various components of the form 7765bd8deadSopenharmony_ci 7775bd8deadSopenharmony_ci A * B + (1-A) * C 7785bd8deadSopenharmony_ci 7795bd8deadSopenharmony_ci The value of A should not be allowed to be negative otherwise, 7805bd8deadSopenharmony_ci the value of (1-A) may exceed 1.0. These linear interpolations 7815bd8deadSopenharmony_ci should be written in the form 7825bd8deadSopenharmony_ci 7835bd8deadSopenharmony_ci max(0,A) * B + (1-max(0,A)) * C 7845bd8deadSopenharmony_ci 7855bd8deadSopenharmony_ci The GL_ADD operation clamps its result to 1.0, but if negative 7865bd8deadSopenharmony_ci components are permitted, the result should be clamped to the range 7875bd8deadSopenharmony_ci [-1,1]. 7885bd8deadSopenharmony_ci 7895bd8deadSopenharmony_ci The GL_COMBINE_ARB (and GL_COMBINE_EXT) and GL_COMBINE4_NV 7905bd8deadSopenharmony_ci operations do explicit clamping of all result to [0,1]. 7915bd8deadSopenharmony_ci In addition, NV_texture_shader adds requirements to clamp 7925bd8deadSopenharmony_ci inputs to [0,1] too. This is because the GL_ONE_MINUS_SRC_COLOR 7935bd8deadSopenharmony_ci and GL_ONE_MINUS_SRC_ALPHA operands should really be computing 7945bd8deadSopenharmony_ci 1-max(0,C). For completeness, GL_SRC_COLOR and GL_SRC_ALPHA should 7955bd8deadSopenharmony_ci be computing max(0,C). 7965bd8deadSopenharmony_ci 7975bd8deadSopenharmony_ci With signed texture components, does the color sum discussion need 7985bd8deadSopenharmony_ci to be amended? 7995bd8deadSopenharmony_ci 8005bd8deadSopenharmony_ci RESOLUTION: Yes. The primary and secondary color should both be 8015bd8deadSopenharmony_ci clamped to the range [0,1] before they are summed. 8025bd8deadSopenharmony_ci 8035bd8deadSopenharmony_ci The unextended OpenGL 1.2 description of color sum does not 8045bd8deadSopenharmony_ci require a clamp of the primary and secondary colors to the [0,1] 8055bd8deadSopenharmony_ci range before they are summed. Before signed texture components, 8065bd8deadSopenharmony_ci the standard texture environment modes either could not generate 8075bd8deadSopenharmony_ci results outside the [0,1] range or explicitly clamped their 8085bd8deadSopenharmony_ci results to this range (as in the case of GL_ADD, GL_COMBINE_EXT, 8095bd8deadSopenharmony_ci and GL_COMBINE4_NV). Now with signed texture components, negative 8105bd8deadSopenharmony_ci values can be generated by texture environment functions. 8115bd8deadSopenharmony_ci 8125bd8deadSopenharmony_ci We do not want to clamp the intermediate results of texture 8135bd8deadSopenharmony_ci environment stages since negative results may be useful in 8145bd8deadSopenharmony_ci subsequent stages, but clamping should be applied to the primary 8155bd8deadSopenharmony_ci color immediately before the color sum. For symmetry, clamping of 8165bd8deadSopenharmony_ci the secondary color is specified as well (though there is currently 8175bd8deadSopenharmony_ci no way to generate a negative secondary color). 8185bd8deadSopenharmony_ci 8195bd8deadSopenharmony_ci Why vibrance? 8205bd8deadSopenharmony_ci 8215bd8deadSopenharmony_ci Vibrance is the fourth component of the external representation of a 8225bd8deadSopenharmony_ci texture offset group. During pixel transfer, vibrance is scaled and 8235bd8deadSopenharmony_ci biased based on the GL_VIBRANCE_SCALE and GL_VIBRANCE_BIAS state. 8245bd8deadSopenharmony_ci Once transformed, the vibrance component becomes the intensity 8255bd8deadSopenharmony_ci component for textures with a DSDT_MAG_INTENSITY base internal 8265bd8deadSopenharmony_ci format. Vibrance is meaningful only when specifying texture images 8275bd8deadSopenharmony_ci with the DS_DT_MAG_VIB_NV external format (and is not supported 8285bd8deadSopenharmony_ci when reading, drawing, or copying pixels). 8295bd8deadSopenharmony_ci 8305bd8deadSopenharmony_ci There are lots of reasons that a texture shader stage is inconsistent, 8315bd8deadSopenharmony_ci and in which case, the stage operates as if the operation is NONE. 8325bd8deadSopenharmony_ci For debugging sanity, is there a way to determine whether a particular 8335bd8deadSopenharmony_ci texture shader stage is consistent? 8345bd8deadSopenharmony_ci 8355bd8deadSopenharmony_ci RESOLUTION: Yes. Query the shader consistency of a particular 8365bd8deadSopenharmony_ci texture unit with: 8375bd8deadSopenharmony_ci 8385bd8deadSopenharmony_ci GLint consistent; 8395bd8deadSopenharmony_ci 8405bd8deadSopenharmony_ci glActiveTextureARB(stage_to_check); 8415bd8deadSopenharmony_ci glGetTexEnviv(GL_TEXTURE_SHADER_NV, GL_SHADER_CONSISTENT_NV, 8425bd8deadSopenharmony_ci &consistent); 8435bd8deadSopenharmony_ci 8445bd8deadSopenharmony_ci consistent is one or zero depending on whether the shader stage 8455bd8deadSopenharmony_ci is consistent or not. 8465bd8deadSopenharmony_ci 8475bd8deadSopenharmony_ci Should there be signed components with sub 8-bit precision? 8485bd8deadSopenharmony_ci 8495bd8deadSopenharmony_ci RESOLUTION: No. 8505bd8deadSopenharmony_ci 8515bd8deadSopenharmony_ci Should packed pixel formats for texture offset groups be supported? 8525bd8deadSopenharmony_ci 8535bd8deadSopenharmony_ci RESOLUTION: Yes, but they are limited to UNSIGNED_INT_S8_S8_8_8_NV 8545bd8deadSopenharmony_ci and UNSIGNED_INT_8_8_S8_S8_REV_NV for use with the DSDT_MAG_VIB_NV 8555bd8deadSopenharmony_ci format. 8565bd8deadSopenharmony_ci 8575bd8deadSopenharmony_ci Note that these two new packed pixel formats are only for the 8585bd8deadSopenharmony_ci DSDT_MAG_VIB_NV and cannot be used with RGBA or BGRA formats. 8595bd8deadSopenharmony_ci Likewise, the RGBA and BGRA formats cannot be used with the new 8605bd8deadSopenharmony_ci UNSIGNED_INT_S8_S8_8_8_NV and UNSIGNED_INT_8_8_S8_S8_REV_NV types. 8615bd8deadSopenharmony_ci 8625bd8deadSopenharmony_ci What should be said about signed fixed-point precision and range of 8635bd8deadSopenharmony_ci actual implementations? 8645bd8deadSopenharmony_ci 8655bd8deadSopenharmony_ci RESOLUTION: The core OpenGL specification typically specifies 8665bd8deadSopenharmony_ci fixed-point numerical computations without regard to the specific 8675bd8deadSopenharmony_ci precision of the computations. This practice is intentional because 8685bd8deadSopenharmony_ci it permits implementations to vary in the degree of precision used 8695bd8deadSopenharmony_ci for internal OpenGL computations. When mapping unsigned fixed-point 8705bd8deadSopenharmony_ci values to a [0,1] range, the mapping is straightforward. 8715bd8deadSopenharmony_ci 8725bd8deadSopenharmony_ci However, this extension supports signed texture components in 8735bd8deadSopenharmony_ci the range [-1,1]. This presents some awkward choices for how to 8745bd8deadSopenharmony_ci map [-1,1] to a fixed-point representation. Assuming a binary 8755bd8deadSopenharmony_ci fixed-point representation with an even distribution of precision, 8765bd8deadSopenharmony_ci there is no way to exactly represent -1, 0, and 1 and avoid 8775bd8deadSopenharmony_ci representing values outside the [-1,1] range. 8785bd8deadSopenharmony_ci 8795bd8deadSopenharmony_ci This is not a unique issue for this extension. In core OpenGL, 8805bd8deadSopenharmony_ci table 2.6 describes mappings from unsigned integer types (GLbyte, 8815bd8deadSopenharmony_ci GLshort, and GLint) that preclude the exact specification of 0.0. 8825bd8deadSopenharmony_ci NV_register_combiners supports signed fixed-point values that have 8835bd8deadSopenharmony_ci similar representation issues. 8845bd8deadSopenharmony_ci 8855bd8deadSopenharmony_ci NVIDIA's solution to this representation problem is to use 8-, 9-, 8865bd8deadSopenharmony_ci and 16-bit fixed-point representations for signed values in the 8875bd8deadSopenharmony_ci [-1,1] range such that 8885bd8deadSopenharmony_ci 8895bd8deadSopenharmony_ci floating-point 8-bit fixed-point 9-bit fixed-point 16 bit fixed-point 8905bd8deadSopenharmony_ci -------------- ----------------- ----------------- ------------------ 8915bd8deadSopenharmony_ci 1.0 n/a 255 n/a 8925bd8deadSopenharmony_ci 0.99996... n/a n/a 32767 8935bd8deadSopenharmony_ci 0.99218... 127 n/a n/a 8945bd8deadSopenharmony_ci 0.0 0 0 0 8955bd8deadSopenharmony_ci -1.0 -128 -255 -32768 8965bd8deadSopenharmony_ci -1.00392... n/a -256 n/a 8975bd8deadSopenharmony_ci 8985bd8deadSopenharmony_ci The 8-bit and 16-bit signed fixed-point types are used for signed 8995bd8deadSopenharmony_ci internal texture formats, while the 9-bit signed fixed-point type 9005bd8deadSopenharmony_ci is used for register combiners computations. 9015bd8deadSopenharmony_ci 9025bd8deadSopenharmony_ci The 9-bit signed fixed-point type has the disadvantage that a 9035bd8deadSopenharmony_ci number slightly more negative than -1 can be represented and this 9045bd8deadSopenharmony_ci particular value is different dependent on the number of bits of 9055bd8deadSopenharmony_ci fixed-point precision. The advantage of this approach is that 1, 9065bd8deadSopenharmony_ci 0, and -1 can all be represented exactly. 9075bd8deadSopenharmony_ci 9085bd8deadSopenharmony_ci The 8-bit and 16-bit signed fixed-point types have the disadvantage 9095bd8deadSopenharmony_ci that 1.0 cannot be exactly represented (though -1.0 and zero can 9105bd8deadSopenharmony_ci be exactly represented). 9115bd8deadSopenharmony_ci 9125bd8deadSopenharmony_ci The specification however is written using the conventional 9135bd8deadSopenharmony_ci OpenGL practice (table 2.6) of mapping signed values evenly over 9145bd8deadSopenharmony_ci the range [-1,1] so that zero cannot be precisely represented. 9155bd8deadSopenharmony_ci This is done to keep this specification consistent with OpenGL's 9165bd8deadSopenharmony_ci existing conventions and to avoid the ugliness of specifying 9175bd8deadSopenharmony_ci a precision-dependent range. We expect leeway in how signed 9185bd8deadSopenharmony_ci fixed-point values are represented. 9195bd8deadSopenharmony_ci 9205bd8deadSopenharmony_ci The spirit of this extension is that an implicit allowance is 9215bd8deadSopenharmony_ci made for signed fixed-point representations that cannot exactly 9225bd8deadSopenharmony_ci represent 1.0. 9235bd8deadSopenharmony_ci 9245bd8deadSopenharmony_ci How should NV_texture_rectangle interact with NV_texture_shader? 9255bd8deadSopenharmony_ci 9265bd8deadSopenharmony_ci NV_texture_rectangle introduces a new texture target similar 9275bd8deadSopenharmony_ci to GL_TEXTURE_2D but that supports non-power-of-two texture 9285bd8deadSopenharmony_ci dimensions and several usage restrictions (no mipmapping, etc). 9295bd8deadSopenharmony_ci Also the imaged texture coordinate range for rectangular textures 9305bd8deadSopenharmony_ci is [0,width]x[0,height] rather than [0,1]x[0,1]. 9315bd8deadSopenharmony_ci 9325bd8deadSopenharmony_ci Four texture shader operations will operate like their 2D texture 9335bd8deadSopenharmony_ci counter-parts, but will access the rectangular texture 9345bd8deadSopenharmony_ci target rather than the 2D texture target. These are: 9355bd8deadSopenharmony_ci 9365bd8deadSopenharmony_ci GL_TEXTURE_RECTANGLE_NV 9375bd8deadSopenharmony_ci GL_OFFSET_TEXTURE_RECTANGLE_NV 9385bd8deadSopenharmony_ci GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 9395bd8deadSopenharmony_ci GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 9405bd8deadSopenharmony_ci 9415bd8deadSopenharmony_ci A few 2D texture shader operations, namely 9425bd8deadSopenharmony_ci GL_DEPENDENT_AR_TEXTURE_2D_NV and GL_DEPENDENT_GB_TEXTURE_2D_NV, 9435bd8deadSopenharmony_ci do not support rectangular textures because turning colors in the 9445bd8deadSopenharmony_ci [0,1] range into texture coordinates would only access a single 9455bd8deadSopenharmony_ci corner texel in a rectangular texture. The offset and dot product 9465bd8deadSopenharmony_ci rectangular texture shader operations support scaling of the 9475bd8deadSopenharmony_ci dependent texture coordinates so these operations can access the 9485bd8deadSopenharmony_ci entire image of a rectangular texture. Note however that it is the 9495bd8deadSopenharmony_ci responsibility of the application to perform the proper scaling. 9505bd8deadSopenharmony_ci 9515bd8deadSopenharmony_ci Note that the 2D and rectangular "offset texture" shaders both 9525bd8deadSopenharmony_ci use the same matrix, scale, and bias state. 9535bd8deadSopenharmony_ci 9545bd8deadSopenharmony_ci Does the GL_DOT_PRODUCT_DEPTH_REPLACE_NV operation happen before or 9555bd8deadSopenharmony_ci after polygon offset? 9565bd8deadSopenharmony_ci 9575bd8deadSopenharmony_ci RESOLUTION: After. The window Z (w_z) is computed during 9585bd8deadSopenharmony_ci rasterization and polygon offset occurs at this point. The depth 9595bd8deadSopenharmony_ci replace operation occurs after rasterization (at the point that 9605bd8deadSopenharmony_ci conventional OpenGL calls "texturing") so when the depth value 9615bd8deadSopenharmony_ci is replaced, the effect of polygon offset (and normal depth 9625bd8deadSopenharmony_ci interpolation) is lost when using the depth replace operation. 9635bd8deadSopenharmony_ci 9645bd8deadSopenharmony_ci How does the GL_DOT_PRODUCT_DEPTH_REPLACE_NV operation interact with 9655bd8deadSopenharmony_ci ARB_multisample? 9665bd8deadSopenharmony_ci 9675bd8deadSopenharmony_ci RESOLUTION: The depth value for all covered samples of a 9685bd8deadSopenharmony_ci multisampled fragment are replaced with the _same_ single depth 9695bd8deadSopenharmony_ci value computed by the depth replace operation. Without depth 9705bd8deadSopenharmony_ci replace, the depth values of each sample of a fragment may have 9715bd8deadSopenharmony_ci slightly different depth values because of the polygon's depth 9725bd8deadSopenharmony_ci gradient. 9735bd8deadSopenharmony_ci 9745bd8deadSopenharmony_ci How should the clamping work for GL_OFFSET_TEXTURE_2D_SCALE? 9755bd8deadSopenharmony_ci 9765bd8deadSopenharmony_ci RESOLUTION: The scale factor should be clamped to [0,1] prior 9775bd8deadSopenharmony_ci to scaling red, green, and blue. 9785bd8deadSopenharmony_ci 9795bd8deadSopenharmony_ci Red, green, and blue are guaranteed to be unsigned RGB values 9805bd8deadSopenharmony_ci so the [0,1] scale factor times the [0,1] RGB values results in 9815bd8deadSopenharmony_ci [0,1] values so no output clamping need be specified. 9825bd8deadSopenharmony_ci 9835bd8deadSopenharmony_ciNew Procedures and Functions 9845bd8deadSopenharmony_ci 9855bd8deadSopenharmony_ci None. 9865bd8deadSopenharmony_ci 9875bd8deadSopenharmony_ciNew Tokens 9885bd8deadSopenharmony_ci 9895bd8deadSopenharmony_ci Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, 9905bd8deadSopenharmony_ci and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, 9915bd8deadSopenharmony_ci and GetDoublev, and by the <target> parameter of TexEnvf, TexEnvfv, 9925bd8deadSopenharmony_ci TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv: 9935bd8deadSopenharmony_ci 9945bd8deadSopenharmony_ci TEXTURE_SHADER_NV 0x86DE 9955bd8deadSopenharmony_ci 9965bd8deadSopenharmony_ci When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, 9975bd8deadSopenharmony_ci GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value 9985bd8deadSopenharmony_ci of <pname> may be: 9995bd8deadSopenharmony_ci 10005bd8deadSopenharmony_ci RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 10015bd8deadSopenharmony_ci SHADER_OPERATION_NV 0x86DF 10025bd8deadSopenharmony_ci OFFSET_TEXTURE_SCALE_NV 0x86E2 10035bd8deadSopenharmony_ci OFFSET_TEXTURE_BIAS_NV 0x86E3 10045bd8deadSopenharmony_ci OFFSET_TEXTURE_2D_SCALE_NV alias for OFFSET_TEXTURE_SCALE_NV 10055bd8deadSopenharmony_ci OFFSET_TEXTURE_2D_BIAS_NV deprecated alias for OFFSET_TEXTURE_BIAS_NV 10065bd8deadSopenharmony_ci PREVIOUS_TEXTURE_INPUT_NV 0x86E4 10075bd8deadSopenharmony_ci 10085bd8deadSopenharmony_ci When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and 10095bd8deadSopenharmony_ci GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be: 10105bd8deadSopenharmony_ci 10115bd8deadSopenharmony_ci CULL_MODES_NV 0x86E0 10125bd8deadSopenharmony_ci OFFSET_TEXTURE_MATRIX_NV 0x86E1 10135bd8deadSopenharmony_ci OFFSET_TEXTURE_2D_MATRIX_NV deprecated alias for OFFSET_TEXTURE_MATRIX_NV 10145bd8deadSopenharmony_ci CONST_EYE_NV 0x86E5 10155bd8deadSopenharmony_ci 10165bd8deadSopenharmony_ci When the <target> parameter GetTexEnvfv and GetTexEnviv is 10175bd8deadSopenharmony_ci TEXTURE_SHADER_NV, then the value of <pname> may be: 10185bd8deadSopenharmony_ci 10195bd8deadSopenharmony_ci SHADER_CONSISTENT_NV 0x86DD 10205bd8deadSopenharmony_ci 10215bd8deadSopenharmony_ci When the <target> and <pname> parameters of TexEnvf, TexEnvfv, 10225bd8deadSopenharmony_ci TexEnvi, and TexEnviv are TEXTURE_ENV and TEXTURE_ENV_MODE 10235bd8deadSopenharmony_ci respectively, then the value of <param> or the value pointed to by 10245bd8deadSopenharmony_ci <params> may be: 10255bd8deadSopenharmony_ci 10265bd8deadSopenharmony_ci NONE 10275bd8deadSopenharmony_ci 10285bd8deadSopenharmony_ci When the <target> and <pname> parameters of TexEnvf, TexEnvfv, 10295bd8deadSopenharmony_ci TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV 10305bd8deadSopenharmony_ci respectively, then the value of <param> or the value pointed to by 10315bd8deadSopenharmony_ci <params> may be: 10325bd8deadSopenharmony_ci 10335bd8deadSopenharmony_ci NONE 10345bd8deadSopenharmony_ci 10355bd8deadSopenharmony_ci TEXTURE_1D 10365bd8deadSopenharmony_ci TEXTURE_2D 10375bd8deadSopenharmony_ci TEXTURE_RECTANGLE_NV (see NV_texture_rectangle) 10385bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_ARB (see ARB_texture_cube_map) 10395bd8deadSopenharmony_ci 10405bd8deadSopenharmony_ci PASS_THROUGH_NV 0x86E6 10415bd8deadSopenharmony_ci CULL_FRAGMENT_NV 0x86E7 10425bd8deadSopenharmony_ci 10435bd8deadSopenharmony_ci OFFSET_TEXTURE_2D_NV 0x86E8 10445bd8deadSopenharmony_ci OFFSET_TEXTURE_2D_SCALE_NV see above, note aliasing 10455bd8deadSopenharmony_ci OFFSET_TEXTURE_RECTANGLE_NV 0x864C 10465bd8deadSopenharmony_ci OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D 10475bd8deadSopenharmony_ci DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 10485bd8deadSopenharmony_ci DEPENDENT_GB_TEXTURE_2D_NV 0x86EA 10495bd8deadSopenharmony_ci 10505bd8deadSopenharmony_ci DOT_PRODUCT_NV 0x86EC 10515bd8deadSopenharmony_ci DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED 10525bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_2D_NV 0x86EE 10535bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E 10545bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 10555bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 10565bd8deadSopenharmony_ci DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 10575bd8deadSopenharmony_ci DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 10585bd8deadSopenharmony_ci 10595bd8deadSopenharmony_ci When the <target> and <pname> parameters of TexEnvfv and TexEnviv 10605bd8deadSopenharmony_ci are TEXTURE_SHADER_NV and CULL_MODES_NV respectively, then the value 10615bd8deadSopenharmony_ci of <param> or the value pointed to by <params> may be: 10625bd8deadSopenharmony_ci 10635bd8deadSopenharmony_ci LESS 10645bd8deadSopenharmony_ci GEQUAL 10655bd8deadSopenharmony_ci 10665bd8deadSopenharmony_ci When the <target> and <pname> parameters of TexEnvf, 10675bd8deadSopenharmony_ci TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and 10685bd8deadSopenharmony_ci RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV respectively, then the value 10695bd8deadSopenharmony_ci of <param> or the value pointed to by <params> may be: 10705bd8deadSopenharmony_ci 10715bd8deadSopenharmony_ci UNSIGNED_IDENTITY_NV (see NV_register_combiners) 10725bd8deadSopenharmony_ci EXPAND_NORMAL_NV (see NV_register_combiners) 10735bd8deadSopenharmony_ci 10745bd8deadSopenharmony_ci When the <target> and <pname> parameters of TexEnvf, 10755bd8deadSopenharmony_ci TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and 10765bd8deadSopenharmony_ci PREVIOUS_TEXTURE_INPUT_NV respectively, then the value of <param> 10775bd8deadSopenharmony_ci or the value pointed to by <params> may be: 10785bd8deadSopenharmony_ci 10795bd8deadSopenharmony_ci TEXTURE0_ARB 10805bd8deadSopenharmony_ci TEXTURE1_ARB 10815bd8deadSopenharmony_ci TEXTURE2_ARB 10825bd8deadSopenharmony_ci TEXTURE3_ARB 10835bd8deadSopenharmony_ci TEXTURE4_ARB 10845bd8deadSopenharmony_ci TEXTURE5_ARB 10855bd8deadSopenharmony_ci TEXTURE6_ARB 10865bd8deadSopenharmony_ci TEXTURE7_ARB 10875bd8deadSopenharmony_ci 10885bd8deadSopenharmony_ci Accepted by the <format> parameter of GetTexImage, TexImage1D, 10895bd8deadSopenharmony_ci TexImage2D, TexSubImage1D, and TexSubImage2D: 10905bd8deadSopenharmony_ci 10915bd8deadSopenharmony_ci HILO_NV 0x86F4 10925bd8deadSopenharmony_ci DSDT_NV 0x86F5 10935bd8deadSopenharmony_ci DSDT_MAG_NV 0x86F6 10945bd8deadSopenharmony_ci DSDT_MAG_VIB_NV 0x86F7 10955bd8deadSopenharmony_ci 10965bd8deadSopenharmony_ci Accepted by the <type> parameter of GetTexImage, TexImage1D, 10975bd8deadSopenharmony_ci TexImage2D, TexSubImage1D, and TexSubImage2D: 10985bd8deadSopenharmony_ci 10995bd8deadSopenharmony_ci UNSIGNED_INT_S8_S8_8_8_NV 0x86DA 11005bd8deadSopenharmony_ci UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB 11015bd8deadSopenharmony_ci 11025bd8deadSopenharmony_ci Accepted by the <internalformat> parameter of CopyTexImage1D, 11035bd8deadSopenharmony_ci CopyTexImage2D, TexImage1D, and TexImage2D: 11045bd8deadSopenharmony_ci 11055bd8deadSopenharmony_ci SIGNED_RGBA_NV 0x86FB 11065bd8deadSopenharmony_ci SIGNED_RGBA8_NV 0x86FC 11075bd8deadSopenharmony_ci SIGNED_RGB_NV 0x86FE 11085bd8deadSopenharmony_ci SIGNED_RGB8_NV 0x86FF 11095bd8deadSopenharmony_ci SIGNED_LUMINANCE_NV 0x8701 11105bd8deadSopenharmony_ci SIGNED_LUMINANCE8_NV 0x8702 11115bd8deadSopenharmony_ci SIGNED_LUMINANCE_ALPHA_NV 0x8703 11125bd8deadSopenharmony_ci SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 11135bd8deadSopenharmony_ci SIGNED_ALPHA_NV 0x8705 11145bd8deadSopenharmony_ci SIGNED_ALPHA8_NV 0x8706 11155bd8deadSopenharmony_ci SIGNED_INTENSITY_NV 0x8707 11165bd8deadSopenharmony_ci SIGNED_INTENSITY8_NV 0x8708 11175bd8deadSopenharmony_ci SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C 11185bd8deadSopenharmony_ci SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D 11195bd8deadSopenharmony_ci 11205bd8deadSopenharmony_ci Accepted by the <internalformat> parameter of TexImage1D and 11215bd8deadSopenharmony_ci TexImage2D: 11225bd8deadSopenharmony_ci 11235bd8deadSopenharmony_ci HILO_NV 11245bd8deadSopenharmony_ci HILO16_NV 0x86F8 11255bd8deadSopenharmony_ci SIGNED_HILO_NV 0x86F9 11265bd8deadSopenharmony_ci SIGNED_HILO16_NV 0x86FA 11275bd8deadSopenharmony_ci DSDT_NV 11285bd8deadSopenharmony_ci DSDT8_NV 0x8709 11295bd8deadSopenharmony_ci DSDT_MAG_NV 11305bd8deadSopenharmony_ci DSDT8_MAG8_NV 0x870A 11315bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV 0x86DC 11325bd8deadSopenharmony_ci DSDT8_MAG8_INTENSITY8_NV 0x870B 11335bd8deadSopenharmony_ci 11345bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 11355bd8deadSopenharmony_ci GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi: 11365bd8deadSopenharmony_ci 11375bd8deadSopenharmony_ci HI_SCALE_NV 0x870E 11385bd8deadSopenharmony_ci LO_SCALE_NV 0x870F 11395bd8deadSopenharmony_ci DS_SCALE_NV 0x8710 11405bd8deadSopenharmony_ci DT_SCALE_NV 0x8711 11415bd8deadSopenharmony_ci MAGNITUDE_SCALE_NV 0x8712 11425bd8deadSopenharmony_ci VIBRANCE_SCALE_NV 0x8713 11435bd8deadSopenharmony_ci HI_BIAS_NV 0x8714 11445bd8deadSopenharmony_ci LO_BIAS_NV 0x8715 11455bd8deadSopenharmony_ci DS_BIAS_NV 0x8716 11465bd8deadSopenharmony_ci DT_BIAS_NV 0x8717 11475bd8deadSopenharmony_ci MAGNITUDE_BIAS_NV 0x8718 11485bd8deadSopenharmony_ci VIBRANCE_BIAS_NV 0x8719 11495bd8deadSopenharmony_ci 11505bd8deadSopenharmony_ci Accepted by the <pname> parameter of TexParameteriv, TexParameterfv, 11515bd8deadSopenharmony_ci GetTexParameterfv and GetTexParameteriv: 11525bd8deadSopenharmony_ci 11535bd8deadSopenharmony_ci TEXTURE_BORDER_VALUES_NV 0x871A 11545bd8deadSopenharmony_ci 11555bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetTexLevelParameterfv and 11565bd8deadSopenharmony_ci GetTexLevelParameteriv: 11575bd8deadSopenharmony_ci 11585bd8deadSopenharmony_ci TEXTURE_HI_SIZE_NV 0x871B 11595bd8deadSopenharmony_ci TEXTURE_LO_SIZE_NV 0x871C 11605bd8deadSopenharmony_ci TEXTURE_DS_SIZE_NV 0x871D 11615bd8deadSopenharmony_ci TEXTURE_DT_SIZE_NV 0x871E 11625bd8deadSopenharmony_ci TEXTURE_MAG_SIZE_NV 0x871F 11635bd8deadSopenharmony_ci 11645bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2 Specification (OpenGL Operation) 11655bd8deadSopenharmony_ci 11665bd8deadSopenharmony_ci None 11675bd8deadSopenharmony_ci 11685bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2 Specification (Rasterization) 11695bd8deadSopenharmony_ci 11705bd8deadSopenharmony_ci -- Section 3.6 "Pixel Rectangles" 11715bd8deadSopenharmony_ci 11725bd8deadSopenharmony_ci Add four new rows to table 3.2: 11735bd8deadSopenharmony_ci 11745bd8deadSopenharmony_ci Parameter Name Type Initial Value Valid Range 11755bd8deadSopenharmony_ci ------------------ ----- ------------- ----------- 11765bd8deadSopenharmony_ci HI_SCALE_NV float 1.0 (-Inf,+Inf) 11775bd8deadSopenharmony_ci LO_SCALE_NV float 1.0 (-Inf,+Inf) 11785bd8deadSopenharmony_ci DS_SCALE_NV float 1.0 (-Inf,+Inf) 11795bd8deadSopenharmony_ci DT_SCALE_NV float 1.0 (-Inf,+Inf) 11805bd8deadSopenharmony_ci MAGNITUDE_SCALE_NV float 1.0 (-Inf,+Inf) 11815bd8deadSopenharmony_ci VIBRANCE_SCALE_NV float 1.0 (-Inf,+Inf) 11825bd8deadSopenharmony_ci 11835bd8deadSopenharmony_ci HI_BIAS_NV float 0.0 (-Inf,+Inf) 11845bd8deadSopenharmony_ci LO_BIAS_NV float 0.0 (-Inf,+Inf) 11855bd8deadSopenharmony_ci DS_BIAS_NV float 0.0 (-Inf,+Inf) 11865bd8deadSopenharmony_ci DT_BIAS_NV float 0.0 (-Inf,+Inf) 11875bd8deadSopenharmony_ci MAGNITUDE_BIAS_NV float 0.0 (-Inf,+Inf) 11885bd8deadSopenharmony_ci VIBRANCE_BIAS_NV float 0.0 (-Inf,+Inf) 11895bd8deadSopenharmony_ci 11905bd8deadSopenharmony_ci -- Section 3.6.4 "Rasterization of Pixel Rectangles" 11915bd8deadSopenharmony_ci 11925bd8deadSopenharmony_ci Add before the subsection titled "Unpacking": 11935bd8deadSopenharmony_ci 11945bd8deadSopenharmony_ci "The HILO_NV, DSDT_NV, DSDT_MAG_NV, and DSDT_MAG_VIB_NV formats 11955bd8deadSopenharmony_ci are described in this section and section 3.6.5 even though these 11965bd8deadSopenharmony_ci formats are supported only for texture images. Textures with 11975bd8deadSopenharmony_ci the HILO_NV format are intended for use with certain dot product 11985bd8deadSopenharmony_ci texture and dependent texture shader operations (see section 3.8.13). 11995bd8deadSopenharmony_ci Textures with the DSDT_NV, DSDT_MAG_NV, and DSDT_MAG_VIB_NV format 12005bd8deadSopenharmony_ci are intended for use with certain offset texture 2D texture shader 12015bd8deadSopenharmony_ci operations (see section 3.8.13). 12025bd8deadSopenharmony_ci 12035bd8deadSopenharmony_ci The error INVALID_ENUM occurs if HILO_NV, DSDT_NV, DSDT_MAG_NV, or 12045bd8deadSopenharmony_ci DSDT_MAG_VIB_NV is used as the format for DrawPixels, ReadPixels, 12055bd8deadSopenharmony_ci or other commands that specify or query an image with a format and 12065bd8deadSopenharmony_ci type parameter though the image is not a texture image. The HILO_NV, 12075bd8deadSopenharmony_ci DSDT_NV, DSDT_MAG_NV, or DSDT_MAG_VIB_NV formats are intended for 12085bd8deadSopenharmony_ci use with the TexImage and TexSubImage commands. 12095bd8deadSopenharmony_ci 12105bd8deadSopenharmony_ci The HILO_NV format consists of two components, hi and lo, in the hi 12115bd8deadSopenharmony_ci then lo order. The hi and lo components maintain at least 16 bits 12125bd8deadSopenharmony_ci of storage per component (at least 16 bits of magnitude for unsigned 12135bd8deadSopenharmony_ci components and at least 15 bits of magnitude for signed components). 12145bd8deadSopenharmony_ci 12155bd8deadSopenharmony_ci The DSDT_NV format consists of two signed components ds and dt, 12165bd8deadSopenharmony_ci in the ds then dt order. The DSDT_MAG_NV format consists of 12175bd8deadSopenharmony_ci three components: the signed ds and dt components and an unsigned 12185bd8deadSopenharmony_ci magnitude component (mag for short), in the ds, then dt, then mag 12195bd8deadSopenharmony_ci order. The DSDT_MAG_VIB_NV format consists of four components: 12205bd8deadSopenharmony_ci the signed ds and dt components, an unsigned magnitude component 12215bd8deadSopenharmony_ci (mag for short), and an unsigned vibrance component (vib for short), 12225bd8deadSopenharmony_ci in the ds, then dt, then mag, then vib order." 12235bd8deadSopenharmony_ci 12245bd8deadSopenharmony_ci Add a new row to table 3.8: 12255bd8deadSopenharmony_ci 12265bd8deadSopenharmony_citype Parameter GL Data Number of Matching 12275bd8deadSopenharmony_ciToken Name Type Components Pixel Formats 12285bd8deadSopenharmony_ci----------------------------- ------- ---------- ---------------- 12295bd8deadSopenharmony_ciUNSIGNED_INT_S8_S8_8_8_NV uint 4 DSDT_MAG_VIB_NV 12305bd8deadSopenharmony_ciUNSIGNED_INT_8_8_S8_S8_REV_NV uint 4 DSDT_MAG_VIB_NV 12315bd8deadSopenharmony_ci 12325bd8deadSopenharmony_ci Add to table 3.11: 12335bd8deadSopenharmony_ci 12345bd8deadSopenharmony_ciUNSIGNED_INT_S8_S8_8_8_NV: 12355bd8deadSopenharmony_ci 12365bd8deadSopenharmony_ci 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 12375bd8deadSopenharmony_ci+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 12385bd8deadSopenharmony_ci| 1st component | 2nd | 3rd | 4th | 12395bd8deadSopenharmony_ci+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 12405bd8deadSopenharmony_ci 12415bd8deadSopenharmony_ciUNSIGNED_INT_8_8_S8_S8_REV_NV: 12425bd8deadSopenharmony_ci 12435bd8deadSopenharmony_ci 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 12445bd8deadSopenharmony_ci+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 12455bd8deadSopenharmony_ci| 4th | 3rd | 2nd | 1st component | 12465bd8deadSopenharmony_ci+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 12475bd8deadSopenharmony_ci 12485bd8deadSopenharmony_ci Replace the fifth paragraph in the subsection titled "Unpacking" 12495bd8deadSopenharmony_ci with the following: 12505bd8deadSopenharmony_ci 12515bd8deadSopenharmony_ci "Calling DrawPixels with a type of UNSIGNED_BYTE_3_3_2, 12525bd8deadSopenharmony_ci UNSIGNED_BYTE_2_3_3_REV, UNSIGNED_SHORT_5_6_5, 12535bd8deadSopenharmony_ci UNSIGNED_SHORT_5_6_5_REV, UNSIGNED_SHORT_4_4_4_4, 12545bd8deadSopenharmony_ci UNSIGNED_SHORT_4_4_4_4_REV, UNSIGNED_SHORT_5_5_5_1, 12555bd8deadSopenharmony_ci UNSIGNED_SHORT_1_5_5_5_REV, UNSIGNED_INT_8_8_8_8, 12565bd8deadSopenharmony_ci UNSIGNED_INT_8_8_8_8_REV, UNSIGNED_INT_10_10_10_2, or 12575bd8deadSopenharmony_ci UNSIGNED_INT_2_10_10_10_REV is a special case in which all 12585bd8deadSopenharmony_ci the components of each group are packed into a single unsigned 12595bd8deadSopenharmony_ci byte, unsigned short, or unsigned int, depending on the type. 12605bd8deadSopenharmony_ci When packing or unpacking texture images (for example, using 12615bd8deadSopenharmony_ci TexImage2D or GetTexImage), the type parameter may also be either 12625bd8deadSopenharmony_ci UNSIGNED_INT_S8_S8_8_8_NV or UNSIGNED_INT_8_8_S8_S8_REV though 12635bd8deadSopenharmony_ci neither symbolic token is permitted for DrawPixels, ReadPixels, 12645bd8deadSopenharmony_ci or other commands that specify or query an image with a format 12655bd8deadSopenharmony_ci and type parameter though the image is not a texture image. 12665bd8deadSopenharmony_ci The error INVALID_ENUM occurs when UNSIGNED_INT_S8_S8_8_8_NV is 12675bd8deadSopenharmony_ci used when it is not permitted. When UNSIGNED_INT_S8_S8_8_8_NV 12685bd8deadSopenharmony_ci or UNSIGNED_INT_8_8_S8_S8_REV_NV is used, the first and second 12695bd8deadSopenharmony_ci components are treated as signed components. The number of 12705bd8deadSopenharmony_ci components per packed pixel is fixed by the type, and must match the 12715bd8deadSopenharmony_ci number of components per group indicated by the format parameter, 12725bd8deadSopenharmony_ci as listed in table 3.8. The format must also be one of the formats 12735bd8deadSopenharmony_ci listed in the Matching Pixel Formats column of table 3.8 for the 12745bd8deadSopenharmony_ci specified packed type. The error INVALID_OPERATION is generated 12755bd8deadSopenharmony_ci if a mismatch occurs. This constraint also holds for all other 12765bd8deadSopenharmony_ci functions that accept or return pixel data using type and format 12775bd8deadSopenharmony_ci parameters to define the type and format of the data." 12785bd8deadSopenharmony_ci 12795bd8deadSopenharmony_ci Amend the second sentence in the sixth paragraph in the subsection 12805bd8deadSopenharmony_ci titled "Unpacking" to read: 12815bd8deadSopenharmony_ci 12825bd8deadSopenharmony_ci "Each bitfield is interpreted as an unsigned integer value unless 12835bd8deadSopenharmony_ci it has been explicitly been stated that the bitfield contains a 12845bd8deadSopenharmony_ci signed component. Signed bitfields are treated as two's complement 12855bd8deadSopenharmony_ci numbers." 12865bd8deadSopenharmony_ci 12875bd8deadSopenharmony_ci Add a new row to table 3.12: 12885bd8deadSopenharmony_ci 12895bd8deadSopenharmony_ci First Second Third Fourth 12905bd8deadSopenharmony_ci Format Component Component Component Component 12915bd8deadSopenharmony_ci --------------- --------- --------- ---------- --------- 12925bd8deadSopenharmony_ci DSDT_MAG_VIB_NV ds dt magnitude vibrance 12935bd8deadSopenharmony_ci 12945bd8deadSopenharmony_ci Change the last sentence in the first paragraph in the subsection 12955bd8deadSopenharmony_ci titled "Conversion to floating-point" to read: 12965bd8deadSopenharmony_ci 12975bd8deadSopenharmony_ci "For packed pixel types, each unsigned element in the group is 12985bd8deadSopenharmony_ci converted by computing c / (2^N-1), where c is the unsigned integer 12995bd8deadSopenharmony_ci value of the bitfield containing the element and N is the number of 13005bd8deadSopenharmony_ci bits in the bitfield. In the case of signed elements of a packed 13015bd8deadSopenharmony_ci pixel type, the signed element is converted by computing 2*c+1 / 13025bd8deadSopenharmony_ci (2^N-1), where c is the signed integer value of the bitfield 13035bd8deadSopenharmony_ci containing the element and N is the number of bits in the bitfield." 13045bd8deadSopenharmony_ci 13055bd8deadSopenharmony_ci Change the first sentence in the subsection "Final Expansion to RGBA" 13065bd8deadSopenharmony_ci to read: 13075bd8deadSopenharmony_ci 13085bd8deadSopenharmony_ci "This step is performed only for groups other than HILO component, 13095bd8deadSopenharmony_ci depth component, and texture offset groups." 13105bd8deadSopenharmony_ci 13115bd8deadSopenharmony_ci Add the following additional enumeration to the kind of pixel groups 13125bd8deadSopenharmony_ci in section 3.6.5: 13135bd8deadSopenharmony_ci 13145bd8deadSopenharmony_ci "5. HILO component: Each group comprises two components: hi and lo. 13155bd8deadSopenharmony_ci 13165bd8deadSopenharmony_ci 6. Texture offset group: Each group comprises four components: 13175bd8deadSopenharmony_ci a ds and dt pair, a magnitude, and a vibrance." 13185bd8deadSopenharmony_ci 13195bd8deadSopenharmony_ci Change the subsection "Arithmetic on Components" in section 3.6.5 13205bd8deadSopenharmony_ci to read: 13215bd8deadSopenharmony_ci 13225bd8deadSopenharmony_ci "This step applies only to RGBA component, depth component, and HILO 13235bd8deadSopenharmony_ci component, and texture offset groups. Each component is multiplied 13245bd8deadSopenharmony_ci by an appropriate signed scale factor: RED_SCALE for an R component, 13255bd8deadSopenharmony_ci GREEN_SCALE for a G component, BLUE_SCALE for a B component, 13265bd8deadSopenharmony_ci ALPHA_SCALE, for an A component, HI_SCALE_NV for a HI component, 13275bd8deadSopenharmony_ci LO_SCALE_NV for a LO component, DS_SCALE_NV for a DS component, 13285bd8deadSopenharmony_ci DT_SCALE_NV for a DT component, MAGNITUDE_SCALE_NV for a MAG 13295bd8deadSopenharmony_ci component, VIBRANCE_SCALE_NV for a VIB component, or DEPTH_SCALE 13305bd8deadSopenharmony_ci for a depth component. 13315bd8deadSopenharmony_ci 13325bd8deadSopenharmony_ci Then the result is added to the appropriate signed bias: RED_BIAS, 13335bd8deadSopenharmony_ci GREEN_BIAS, BLUE_BIAS, ALPHA_BIAS, HI_BIAS_NV, LO_BIAS_NV, 13345bd8deadSopenharmony_ci DS_BIAS_NV, DT_BIAS_NV, MAGNITUDE_BIAS_NV, VIBRANCE_BIAS_NV, or 13355bd8deadSopenharmony_ci DEPTH_BIAS." 13365bd8deadSopenharmony_ci 13375bd8deadSopenharmony_ci -- Section 3.8 "Texturing" 13385bd8deadSopenharmony_ci 13395bd8deadSopenharmony_ci Replace the first paragraph with the following: 13405bd8deadSopenharmony_ci 13415bd8deadSopenharmony_ci "The GL provides two mechanisms for mapping sets of (s,t,r,q) 13425bd8deadSopenharmony_ci texture coordinates to RGBA colors: conventional texturing and 13435bd8deadSopenharmony_ci texture shaders. 13445bd8deadSopenharmony_ci 13455bd8deadSopenharmony_ci Conventional texturing maps a portion of a specified image onto 13465bd8deadSopenharmony_ci each primitive for each enabled texture unit. Conventional 13475bd8deadSopenharmony_ci texture mapping is accomplished by using the color of an image 13485bd8deadSopenharmony_ci at the location indicated by a fragment's non-homogeneous (s,t,r) 13495bd8deadSopenharmony_ci coordinates for a given texture unit. 13505bd8deadSopenharmony_ci 13515bd8deadSopenharmony_ci The alternative to conventional texturing is the texture shaders 13525bd8deadSopenharmony_ci mechanism. When texture shaders are enabled, each texture unit 13535bd8deadSopenharmony_ci uses one of twenty-one texture shader operations. Eighteen of the 13545bd8deadSopenharmony_ci twenty-one shader operations map an (s,t,r,q) texture coordinate 13555bd8deadSopenharmony_ci set to an RGBA color. Of these, three texture shader operations 13565bd8deadSopenharmony_ci directly correspond to the 1D, 2D, and cube map conventional 13575bd8deadSopenharmony_ci texturing operations. Depending on the texture shader operation, 13585bd8deadSopenharmony_ci the mapping from the (s,t,r,q) texture coordinate set to an RGBA 13595bd8deadSopenharmony_ci color may depend on the given texture unit's currently bound 13605bd8deadSopenharmony_ci texture object state and/or the results of previous texture 13615bd8deadSopenharmony_ci shader operations. The three remaining texture shader operations 13625bd8deadSopenharmony_ci respectively provide a fragment culling mechanism based on texture 13635bd8deadSopenharmony_ci coordinates, a means to replace the fragment depth value, and a dot 13645bd8deadSopenharmony_ci product operation that computes a floating-point value for use by 13655bd8deadSopenharmony_ci subsequent texture shaders. The specifics of each texture shader 13665bd8deadSopenharmony_ci operation are described in section 3.8.12. 13675bd8deadSopenharmony_ci 13685bd8deadSopenharmony_ci Texture shading is enabled or disabled using the generic Enable 13695bd8deadSopenharmony_ci and Disable commands, respectively, with the symbolic constant 13705bd8deadSopenharmony_ci TEXTURE_SHADER_NV. When texture shading is disabled, conventional 13715bd8deadSopenharmony_ci texturing generates an RGBA color for each enabled textures unit 13725bd8deadSopenharmony_ci as described in Sections 3.8.10. 13735bd8deadSopenharmony_ci 13745bd8deadSopenharmony_ci After RGBA colors are assigned to each texture unit, either by 13755bd8deadSopenharmony_ci conventional texturing or texture shaders, the GL proceeds with 13765bd8deadSopenharmony_ci fragment coloring, either using the texture environment, fog, 13775bd8deadSopenharmony_ci and color sum operations, or using register combiners extension if 13785bd8deadSopenharmony_ci supported. 13795bd8deadSopenharmony_ci 13805bd8deadSopenharmony_ci Neither conventional texturing nor texture shaders affects the 13815bd8deadSopenharmony_ci secondary color." 13825bd8deadSopenharmony_ci 13835bd8deadSopenharmony_ci -- Section 3.8.1 "Texture Image Specification" 13845bd8deadSopenharmony_ci 13855bd8deadSopenharmony_ci Add the following sentence to the first paragraph: 13865bd8deadSopenharmony_ci 13875bd8deadSopenharmony_ci "The formats HILO_NV, DSDT_NV, DSDT_MAG_NV, and DSDT_MAG_VIB_NV 13885bd8deadSopenharmony_ci are allowed for specifying texture images." 13895bd8deadSopenharmony_ci 13905bd8deadSopenharmony_ci Replace the fourth paragraph with: 13915bd8deadSopenharmony_ci 13925bd8deadSopenharmony_ci "The selected groups are processed exactly as for DrawPixels, 13935bd8deadSopenharmony_ci stopping just before conversion. Each R, G, B, A, HI, LO, DS, DT, 13945bd8deadSopenharmony_ci and MAG value so generated is clamped to [0,1] if the corresponding 13955bd8deadSopenharmony_ci component is unsigned, or if the corresponding component is signed, 13965bd8deadSopenharmony_ci is clamped to [-1,1]. The signedness of components depends on the 13975bd8deadSopenharmony_ci internal format (see table 3.16). The signedness of components 13985bd8deadSopenharmony_ci for unsized internal formats matches the signedness of components 13995bd8deadSopenharmony_ci for any respective sized version of the internal format." 14005bd8deadSopenharmony_ci 14015bd8deadSopenharmony_ci Replace table 3.15 with the following table: 14025bd8deadSopenharmony_ci 14035bd8deadSopenharmony_ci Base Internal Format Component Values Internal Components Format Type 14045bd8deadSopenharmony_ci --------------------- ------------------- ------------------- ------------------------- 14055bd8deadSopenharmony_ci ALPHA A A RGBA 14065bd8deadSopenharmony_ci LUMINANCE R L RGBA 14075bd8deadSopenharmony_ci LUMINANCE_ALPHA R,A L,A RGBA 14085bd8deadSopenharmony_ci INTENSITY R I RGBA 14095bd8deadSopenharmony_ci RGB R,G,B R,G,B RGBA 14105bd8deadSopenharmony_ci RGBA R,G,B,A R,G,B,A RGBA 14115bd8deadSopenharmony_ci HILO_NV HI,LO HI,LO HILO 14125bd8deadSopenharmony_ci DSDT_NV DS,DT DS,DT texture offset group 14135bd8deadSopenharmony_ci DSDT_MAG_NV DS,DT,MAG DS,DT,MAG texture offset group 14145bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV DS,DT,MAG,VIB DS,DT,MAG,I RGBA/texture offset group 14155bd8deadSopenharmony_ci 14165bd8deadSopenharmony_ci Re-caption table 3.15 as: 14175bd8deadSopenharmony_ci 14185bd8deadSopenharmony_ci "Conversion from RGBA, HILO, and texture offset pixel components to 14195bd8deadSopenharmony_ci internal texture table, or filter components. See section 3.8.9 14205bd8deadSopenharmony_ci for a description of the texture components R, G, B, A, L, and I. 14215bd8deadSopenharmony_ci See section 3.8.13 for an explanation of the handling of the texture 14225bd8deadSopenharmony_ci components HI, LO, DS, DT, MAG, and VIB." 14235bd8deadSopenharmony_ci 14245bd8deadSopenharmony_ci Add five more columns to table 3.16 labeled "HI bits", "LO bits", "DS 14255bd8deadSopenharmony_ci bits", "DT bits", and "MAG bits". Existing table rows should have 14265bd8deadSopenharmony_ci these column entries blank. Add the following rows to the table: 14275bd8deadSopenharmony_ci 14285bd8deadSopenharmony_ciSized Base R G B A L I HI LO DS DT MAG 14295bd8deadSopenharmony_ciInternal Format Internal Format bits bits bits bits bits bits bits bits bits bits bits 14305bd8deadSopenharmony_ci------------------------------ --------------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 14315bd8deadSopenharmony_ciHILO16_NV HILO 16 16 14325bd8deadSopenharmony_ciSIGNED_HILO16_NV HILO 16* 16* 14335bd8deadSopenharmony_ciSIGNED_RGBA8_NV RGBA 8* 8* 8* 8* 14345bd8deadSopenharmony_ciSIGNED_RGB8_UNSIGNED_ALPHA8_NV RGBA 8* 8* 8* 8 14355bd8deadSopenharmony_ciSIGNED_RGB8_NV RGB 8* 8* 8* 14365bd8deadSopenharmony_ciSIGNED_LUMINANCE8_NV LUMINANCE 8* 14375bd8deadSopenharmony_ciSIGNED_LUMINANCE8_ALPHA8_NV LUMINANCE_ALPHA 8* 8* 14385bd8deadSopenharmony_ciSIGNED_ALPHA8_NV ALPHA 8* 14395bd8deadSopenharmony_ciSIGNED_INTENSITY8_NV INTENSITY 8* 14405bd8deadSopenharmony_ciDSDT8_NV DSDT_NV 8* 8* 14415bd8deadSopenharmony_ciDSDT8_MAG8_NV DSDT_MAG_NV 8* 8* 8 14425bd8deadSopenharmony_ciDSDT8_MAG8_INTENSITY8_NV DSDT_MAG_INTENSITY_NV 8 8* 8* 8 14435bd8deadSopenharmony_ci 14445bd8deadSopenharmony_ci Add to the caption for table 3.16: 14455bd8deadSopenharmony_ci 14465bd8deadSopenharmony_ci "An asterisk (*) following a component size indicates that the 14475bd8deadSopenharmony_ci corresponding component is signed (the sign bit is included in 14485bd8deadSopenharmony_ci specified component resolution size)." 14495bd8deadSopenharmony_ci 14505bd8deadSopenharmony_ci Change the first sentences of the fifth paragraph to read: 14515bd8deadSopenharmony_ci 14525bd8deadSopenharmony_ci "Components are then selected from the resulting R, G, B, A, HI, LO, 14535bd8deadSopenharmony_ci DS, DT, and MAG values to obtain a texture with the base internal 14545bd8deadSopenharmony_ci format specified by (or derived from) internalformat. Table 3.15 14555bd8deadSopenharmony_ci summarizes the mapping of R, G, B, A, HI, LO, DS, DT, and MAG values 14565bd8deadSopenharmony_ci to texture components, as a function of the base internal format of 14575bd8deadSopenharmony_ci the texture image. internalformat may be specified as one of the 14585bd8deadSopenharmony_ci ten base internal format symbolic constants listed in table 3.15, 14595bd8deadSopenharmony_ci or as one of the sized internal format symbolic constants listed 14605bd8deadSopenharmony_ci in table 3.16." 14615bd8deadSopenharmony_ci 14625bd8deadSopenharmony_ci Add these sentences before the last sentence in the fifth paragraph: 14635bd8deadSopenharmony_ci 14645bd8deadSopenharmony_ci "The error INVALID_OPERATION is generated if the format is 14655bd8deadSopenharmony_ci HILO_NV and the internalformat is not one of HILO_NV, HILO16_NV, 14665bd8deadSopenharmony_ci SIGNED_HILO_NV, SIGNED_HILO16_NV; or if the internalformat is one 14675bd8deadSopenharmony_ci of HILO_NV, HILO16_NV, SIGNED_HILO_NV, or SIGNED_HILO16_NV and the 14685bd8deadSopenharmony_ci format is not HILO_NV. 14695bd8deadSopenharmony_ci 14705bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if the format is DSDT_NV 14715bd8deadSopenharmony_ci and the internalformat is not either DSDT_NV or DSDT8_NV; or if 14725bd8deadSopenharmony_ci the internal format is either DSDT_NV or DSDT8_NV and the format 14735bd8deadSopenharmony_ci is not DSDT_NV. 14745bd8deadSopenharmony_ci 14755bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if the format is DSDT_MAG_NV 14765bd8deadSopenharmony_ci and the internalformat is not either DSDT_MAG_NV or DSDT8_MAG8_NV; 14775bd8deadSopenharmony_ci or if the internal format is either DSDT_MAG_NV or DSDT8_MAG8_NV 14785bd8deadSopenharmony_ci and the format is not DSDT_MAG_NV. 14795bd8deadSopenharmony_ci 14805bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if the format 14815bd8deadSopenharmony_ci is DSDT_MAG_VIB_NV and the internalformat is not either 14825bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV or DSDT8_MAG8_INTENSITY8_NV; or if the internal 14835bd8deadSopenharmony_ci format is either DSDT_MAG_INTENSITY_NV or DSDT8_MAG8_INTENSITY8_NV 14845bd8deadSopenharmony_ci and the format is not DSDT_MAG_VIB_NV." 14855bd8deadSopenharmony_ci 14865bd8deadSopenharmony_ci Change the first sentence of the sixth paragraph to read: 14875bd8deadSopenharmony_ci 14885bd8deadSopenharmony_ci "The internal component resolution is the number of bits allocated 14895bd8deadSopenharmony_ci to each value in a texture image (and includes the sign bit if the 14905bd8deadSopenharmony_ci component is signed)." 14915bd8deadSopenharmony_ci 14925bd8deadSopenharmony_ci Change the third sentence of the sixth paragraph to read: 14935bd8deadSopenharmony_ci 14945bd8deadSopenharmony_ci "If a sized internal format is specified, the mapping of the R, 14955bd8deadSopenharmony_ci G, B, A, HI, LO, DS, DT, and MAG values to texture components 14965bd8deadSopenharmony_ci is equivalent to the mapping of the corresponding base internal 14975bd8deadSopenharmony_ci format's components, as specified in table 3.15, and the memory 14985bd8deadSopenharmony_ci allocations per texture component is assigned by the GL to match 14995bd8deadSopenharmony_ci the allocations listed in table 3.16 as closely as possible." 15005bd8deadSopenharmony_ci 15015bd8deadSopenharmony_ci -- Section 3.8.2 "Alternate Texture Image Specification Commands" 15025bd8deadSopenharmony_ci 15035bd8deadSopenharmony_ci In the second paragraph (describing CopyTexImage2D), change the 15045bd8deadSopenharmony_ci third to the last sentence to: 15055bd8deadSopenharmony_ci 15065bd8deadSopenharmony_ci "Parameters level, internalformat, and border are specified using the 15075bd8deadSopenharmony_ci same values, with the same meanings, as the equivalent arguments of 15085bd8deadSopenharmony_ci TexImage2D, except that internalformat may not be specified as 1, 2, 15095bd8deadSopenharmony_ci 3, 4, HILO_NV, HILO16_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV, DSDT_NV, 15105bd8deadSopenharmony_ci DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV, DSDT_MAG_INTENSITY_NV, or 15115bd8deadSopenharmony_ci DSDT8_MAG8_INTENSITY8_NV." 15125bd8deadSopenharmony_ci 15135bd8deadSopenharmony_ci In the third paragraph (describing CopyTexImage1D), change the 15145bd8deadSopenharmony_ci second to the last sentence to: 15155bd8deadSopenharmony_ci 15165bd8deadSopenharmony_ci "level, internalformat, and border are specified using the same 15175bd8deadSopenharmony_ci values, with the same meanings, as the equivalent arguments of 15185bd8deadSopenharmony_ci TexImage1D, except that internalformat may not be specified as 1, 2, 15195bd8deadSopenharmony_ci 3, 4, HILO_NV, HILO16_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV, DSDT_NV, 15205bd8deadSopenharmony_ci DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV, DSDT_MAG_INTENSITY_NV, or 15215bd8deadSopenharmony_ci DSDT8_MAG8_INTENSITY8_NV." 15225bd8deadSopenharmony_ci 15235bd8deadSopenharmony_ci Insert the following text after the six paragraph reading: 15245bd8deadSopenharmony_ci 15255bd8deadSopenharmony_ci "CopyTexSubImage2D and CopyTexSubImage1D generate the error 15265bd8deadSopenharmony_ci INVALID_OPERATION if the internal format of the texture array to 15275bd8deadSopenharmony_ci which the pixels are to be copied is one of HILO_NV, HILO16_NV, 15285bd8deadSopenharmony_ci SIGNED_HILO_NV, SIGNED_HILO16_NV, DSDT_NV, DSDT8_NV, DSDT_MAG_NV, 15295bd8deadSopenharmony_ci DSDT8_MAG8_NV, DSDT_MAG_INTENSITY_NV, or DSDT8_MAG8_INTENSITY8_NV. 15305bd8deadSopenharmony_ci 15315bd8deadSopenharmony_ci TexSubImage2D and TexSubImage1D generate the error INVALID_OPERATION 15325bd8deadSopenharmony_ci if the internal format of the texture array to which the texels are 15335bd8deadSopenharmony_ci to be copied has a different format type (according to table 3.15) 15345bd8deadSopenharmony_ci than the format type of the texels being specified. Specifically, if 15355bd8deadSopenharmony_ci the base internal format is not one of HILO_NV, DSDT_NV, DSDT_MAG_NV, 15365bd8deadSopenharmony_ci or DSDT_INTENSITY_NV, then the format parameter must be one of 15375bd8deadSopenharmony_ci COLOR_INDEX, RED, GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, or 15385bd8deadSopenharmony_ci LUMINANCE_ALPHA; if the base internal format is HILO_NV, then the 15395bd8deadSopenharmony_ci format parameter must be HILO_NV; if the base internal format is 15405bd8deadSopenharmony_ci DSDT_NV, then the format parameter must be DSDT_NV; if the base 15415bd8deadSopenharmony_ci internal format is DSDT_MAG_NV, then the format parameter must be 15425bd8deadSopenharmony_ci DSDT_MAG_NV; if the base internal format is DSDT_MAG_INTENSITY_NV, 15435bd8deadSopenharmony_ci the format parameter must be DSDT_MAG_VIB_NV." 15445bd8deadSopenharmony_ci 15455bd8deadSopenharmony_ci -- Section 3.8.3 "Texture Parameters" 15465bd8deadSopenharmony_ci 15475bd8deadSopenharmony_ci Change the TEXTURE_BORDER_COLOR line in table 3.17 to read: 15485bd8deadSopenharmony_ci 15495bd8deadSopenharmony_ci Name Type Legal Values 15505bd8deadSopenharmony_ci ------------------------ -------- ------------ 15515bd8deadSopenharmony_ci TEXTURE_BORDER_VALUES 4 floats any value 15525bd8deadSopenharmony_ci 15535bd8deadSopenharmony_ci Add the last two sentences to read: 15545bd8deadSopenharmony_ci 15555bd8deadSopenharmony_ci "The TEXTURE_BORDER_VALUES state can also be specified with the 15565bd8deadSopenharmony_ci TEXTURE_BORDER_COLOR symbolic constant. When the state is specified 15575bd8deadSopenharmony_ci via TEXTURE_BORDER_COLOR, each of the four values specified are 15585bd8deadSopenharmony_ci first clamped to lie in [0,1]. However, if the texture border 15595bd8deadSopenharmony_ci values state is specified using TEXTURE_BORDER_VALUES, no clamping 15605bd8deadSopenharmony_ci occurs. In either case, if the values are specified as integers, 15615bd8deadSopenharmony_ci the conversion for signed integers from table 2.6 is applied to 15625bd8deadSopenharmony_ci convert the values to floating-point." 15635bd8deadSopenharmony_ci 15645bd8deadSopenharmony_ci -- Section 3.8.5 "Texture Minification" 15655bd8deadSopenharmony_ci 15665bd8deadSopenharmony_ci Change the last paragraph to read: 15675bd8deadSopenharmony_ci 15685bd8deadSopenharmony_ci "If any of the selected tauijk, tauij, or taui in the above equations 15695bd8deadSopenharmony_ci refer to a border texel with i < -bs, j < bs, k < -bs, i >= ws-bs, j 15705bd8deadSopenharmony_ci >= hs-bs, or k >= ds-bs, then the border values given by the current 15715bd8deadSopenharmony_ci setting of TEXTURE_BORDER_VALUES is used instead of the unspecified 15725bd8deadSopenharmony_ci value or values. If the texture contains color components, the 15735bd8deadSopenharmony_ci components of the TEXTURE_BORDER_VALUES vector are interpreted as 15745bd8deadSopenharmony_ci an RGBA color to match the texture's internal format in a manner 15755bd8deadSopenharmony_ci consistent with table 3.15. If the texture contains HILO components, 15765bd8deadSopenharmony_ci the first and second components of the TEXTURE_BORDER_VALUES vector 15775bd8deadSopenharmony_ci are interpreted as the hi and lo components respectively. If the 15785bd8deadSopenharmony_ci texture contains texture offset group components, the first, second, 15795bd8deadSopenharmony_ci third, and fourth components of the TEXTURE_BORDER_VALUES vector 15805bd8deadSopenharmony_ci are interpreted as ds, dt, mag, and vib components respectively. 15815bd8deadSopenharmony_ci Additionally, the texture border values are clamped appropriately 15825bd8deadSopenharmony_ci depending on the signedness of each particular component. Unsigned 15835bd8deadSopenharmony_ci components are clamped to [0,1]; signed components are clamped to 15845bd8deadSopenharmony_ci [-1,1]." 15855bd8deadSopenharmony_ci 15865bd8deadSopenharmony_ci -- Section 3.8.9 "Texture Environment and Texture Functions" 15875bd8deadSopenharmony_ci 15885bd8deadSopenharmony_ci Augment the list of supported texture functions in the first 15895bd8deadSopenharmony_ci paragraph to read: 15905bd8deadSopenharmony_ci 15915bd8deadSopenharmony_ci "TEXTURE_ENV_MODE may be set to one of REPLACE, MODULATE, DECAL, 15925bd8deadSopenharmony_ci BLEND, ADD, COMBINE_ARB (or COMBINE_EXT), COMBINE4_NV, or NONE;" 15935bd8deadSopenharmony_ci 15945bd8deadSopenharmony_ci Insert this paragraph between the first and second paragraphs: 15955bd8deadSopenharmony_ci 15965bd8deadSopenharmony_ci "When texture shaders are enabled (see section 3.8.13), a given 15975bd8deadSopenharmony_ci texture unit's texture shader result may be intended for use as 15985bd8deadSopenharmony_ci an input to another texture shader stage rather than generating 15995bd8deadSopenharmony_ci a texture unit RGBA result for use in the given texture unit's 16005bd8deadSopenharmony_ci texture environment function. Additionally, several texture shader 16015bd8deadSopenharmony_ci operations and texture format types are intended only to generate 16025bd8deadSopenharmony_ci texture shader results for subsequent texture shaders or perform a 16035bd8deadSopenharmony_ci side effect (such as culling the fragment or replacing the fragment's 16045bd8deadSopenharmony_ci depth value) rather than supplying a useful texture unit RGBA result 16055bd8deadSopenharmony_ci for use in the texture environment function. For this reason, 16065bd8deadSopenharmony_ci the NONE texture environment ignores the texture unit RGBA result 16075bd8deadSopenharmony_ci and passes through its input fragment color unchanged." 16085bd8deadSopenharmony_ci 16095bd8deadSopenharmony_ci Change the third sentence of the second paragraph to read: 16105bd8deadSopenharmony_ci 16115bd8deadSopenharmony_ci "If the TEXTURE_SHADER_NV mode is disabled, the precise form of 16125bd8deadSopenharmony_ci the texture environment function depends on the base internal 16135bd8deadSopenharmony_ci format of the texture object bound to the given texture unit's 16145bd8deadSopenharmony_ci highest-precedence enabled texture target. Otherwise if the 16155bd8deadSopenharmony_ci TEXTURE_SHADER_NV mode is enabled, then the form of the function 16165bd8deadSopenharmony_ci depends on the texture unit's texture shader operation. 16175bd8deadSopenharmony_ci 16185bd8deadSopenharmony_ci If a texture shader operation requires fetching a filtered 16195bd8deadSopenharmony_ci texture color value (though not a HILO or texture offset value; 16205bd8deadSopenharmony_ci see the subsequent HILO and texture offset discussion), the texture 16215bd8deadSopenharmony_ci environment function depends on the base internal format of the 16225bd8deadSopenharmony_ci texture shader operation's respective texture target used for 16235bd8deadSopenharmony_ci fetching by the texture shader operation. 16245bd8deadSopenharmony_ci 16255bd8deadSopenharmony_ci The PASS_THROUGH_NV texture shader operation does not fetch from any 16265bd8deadSopenharmony_ci texture target, but it generates an RGBA color and therefore always 16275bd8deadSopenharmony_ci operates as if the base internal format is RGBA for determining 16285bd8deadSopenharmony_ci what texture environment function to apply. 16295bd8deadSopenharmony_ci 16305bd8deadSopenharmony_ci If the TEXTURE_SHADER_NV mode is enabled and the texture shader 16315bd8deadSopenharmony_ci operation for a given texture unit is one of NONE, CULL_FRAGMENT_NV, 16325bd8deadSopenharmony_ci DOT_PRODUCT_NV, or DOT_PRODUCT_DEPTH_REPLACE_NV, then the given 16335bd8deadSopenharmony_ci texture unit's texture function always operates as if the texture 16345bd8deadSopenharmony_ci function is NONE. 16355bd8deadSopenharmony_ci 16365bd8deadSopenharmony_ci If the base internal format of the texture is HILO_NV, DSDT_NV, 16375bd8deadSopenharmony_ci or DSDT_MAG_NV (independent of whether or not the TEXTURE_SHADER_NV 16385bd8deadSopenharmony_ci mode is enabled or disabled), then corresponding the texture function 16395bd8deadSopenharmony_ci always operates as if the texture function is NONE. 16405bd8deadSopenharmony_ci 16415bd8deadSopenharmony_ci If the base internal format of the texture is DSDT_MAG_INTENSITY_NV 16425bd8deadSopenharmony_ci (independent of whether or not the TEXTURE_SHADER_NV mode is enabled 16435bd8deadSopenharmony_ci or disabled), then the corresponding texture function operates 16445bd8deadSopenharmony_ci as if the base internal format is INTENSITY for the purposes of 16455bd8deadSopenharmony_ci determining the appropriate function using the vibrance component 16465bd8deadSopenharmony_ci as the intensity value." 16475bd8deadSopenharmony_ci 16485bd8deadSopenharmony_ci Change the phrase in the fourth sentence of the second paragraph 16495bd8deadSopenharmony_ci describing how Rt, Gt, Bt, At, Lt, and It are assigned to: 16505bd8deadSopenharmony_ci 16515bd8deadSopenharmony_ci "when TEXTURE_SHADER_NV is disabled, Rt, Gt, Bt, At, Lt, and It are 16525bd8deadSopenharmony_ci the filtered texture values; when TEXTURE_SHADER_NV is enabled, Rt, 16535bd8deadSopenharmony_ci Gt, Bt, and At are the respective components of the texture unit 16545bd8deadSopenharmony_ci RGBA result of the texture unit's texture shader stage, and Lt and 16555bd8deadSopenharmony_ci It are any red, green, or blue component of the texture unit RGBA 16565bd8deadSopenharmony_ci result (the three components should be the same);" 16575bd8deadSopenharmony_ci 16585bd8deadSopenharmony_ci Change the second to last sentence of the second paragraph to read: 16595bd8deadSopenharmony_ci 16605bd8deadSopenharmony_ci "The initial primary color and texture environment color component 16615bd8deadSopenharmony_ci values are in the range [0,1]. The filtered texture color and 16625bd8deadSopenharmony_ci texture function result color component values are in the range 16635bd8deadSopenharmony_ci [-1,1]. Negative filtered texture color component values are 16645bd8deadSopenharmony_ci generated by texture internal formats with signed components such 16655bd8deadSopenharmony_ci as SIGNED_RGBA." 16665bd8deadSopenharmony_ci 16675bd8deadSopenharmony_ci Also amend tables 3.18 and 3.19 based on the following updated columns: 16685bd8deadSopenharmony_ci 16695bd8deadSopenharmony_ciBase DECAL BLEND ADD 16705bd8deadSopenharmony_ciInternal Format Texture Function Texture Function Texture Function 16715bd8deadSopenharmony_ci================= ===================================== ===================================== ========================== 16725bd8deadSopenharmony_ci ALPHA Rv = Rf (no longer undefined) Rv = Rf Rv = Rf 16735bd8deadSopenharmony_ci Gv = Gf Gv = Gf Gv = Gf 16745bd8deadSopenharmony_ci Bv = Bf Bv = Bf Bv = Rf 16755bd8deadSopenharmony_ci Av = Af Av = Af*At Av = Af*Av = At 16765bd8deadSopenharmony_ci----------------- ------------------------------------- ------------------------------------- -------------------------- 16775bd8deadSopenharmony_ci LUMINANCE Rv = Rf (no longer undefined) Rv = Rf*(1-max(0,Lt)) + Rc*max(0,Lt) Rv = max(-1,min(1,Rf+Lt)) 16785bd8deadSopenharmony_ci (or 1) Gv = Gf Gv = Gf*(1-max(0,Lt)) + Gc*max(0,Lt) Gv = max(-1,min(1,Gf+Lt)) 16795bd8deadSopenharmony_ci Bv = Bf Bv = Bf*(1-max(0,Lt)) + Bc*max(0,Lt) Bv = max(-1,min(1,Bf+Lt)) 16805bd8deadSopenharmony_ci Av = Af Av = Af Av = Af 16815bd8deadSopenharmony_ci----------------- ------------------------------------- ------------------------------------- -------------------------- 16825bd8deadSopenharmony_ci LUMINANCE_ALPHA Rv = Rf (no longer undefined) Rv = Rf*(1-max(0,Lt)) + Rc*max(0,Lt) Rv = max(-1,min(1,Rf+Lt)) 16835bd8deadSopenharmony_ci (or 2) Gv = Gf Gv = Gf*(1-max(0,Lt)) + Gc*max(0,Lt) Gv = max(-1,min(1,Gf+Lt)) 16845bd8deadSopenharmony_ci Bv = Bf Bv = Bf*(1-max(0,Lt)) + Bc*max(0,Lt) Bv = max(-1,min(1,Bf+Lt)) 16855bd8deadSopenharmony_ci Av = Af Av = Af*At Av = Af*At 16865bd8deadSopenharmony_ci----------------- ------------------------------------- ------------------------------------- -------------------------- 16875bd8deadSopenharmony_ci INTENSITY Rv = Rf (no longer undefined) Rv = Rf*(1-max(0,It)) + Rc*max(0,It) Rv = max(-1,min(1,Rf+It)) 16885bd8deadSopenharmony_ci Gv = Gf Gv = Gf*(1-max(0,It)) + Gc*max(0,It) Gv = max(-1,min(1,Gf+It)) 16895bd8deadSopenharmony_ci Bv = Bf Bv = Bf*(1-max(0,It)) + Bc*max(0,It) Bv = max(-1,min(1,Bf+It)) 16905bd8deadSopenharmony_ci Av = Af Av = Af*(1-max(0,It)) + Ac*max(0,It) Av = max(-1,min(1,Af+It)) 16915bd8deadSopenharmony_ci----------------- ------------------------------------- ------------------------------------- -------------------------- 16925bd8deadSopenharmony_ci RGB Rv = Rt Rv = Rf*(1-max(0,Rt)) + Rc*max(0,Rt) Rv = max(-1,min(1,Rf+Rt)) 16935bd8deadSopenharmony_ci (or 3) Gv = Gt Gv = Gf*(1-max(0,Gt)) + Gc*max(0,Gt) Gv = max(-1,min(1,Gf+Gt)) 16945bd8deadSopenharmony_ci Bv = Bt Bv = Bf*(1-max(0,Bt)) + Bc*max(0,Bt) Bv = max(-1,min(1,Bf+Bt)) 16955bd8deadSopenharmony_ci Av = Af Av = Af Av = Af 16965bd8deadSopenharmony_ci----------------- ------------------------------------- ------------------------------------- -------------------------- 16975bd8deadSopenharmony_ci RGBA Rv = Rf*(1-max(0,At)) + Rt*max(0,At) Rv = Rf*(1-max(0,Rt)) + Rc*max(0,Rt) Rv = max(-1,min(1,Rf+Rt)) 16985bd8deadSopenharmony_ci (or 4) Gv = Gf*(1-max(0,At)) + Gt*max(0,At) Gv = Gf*(1-max(0,Gt)) + Gc*max(0,Gt) Gv = max(-1,min(1,Gf+Gt)) 16995bd8deadSopenharmony_ci Bv = Bf*(1-max(0,At)) + Bt*max(0,At) Bv = Bf*(1-max(0,Bt)) + Bc*max(0,Bt) Bv = max(-1,min(1,Bf+Bt)) 17005bd8deadSopenharmony_ci Av = Af Av = Af*At Av = Af*At 17015bd8deadSopenharmony_ci----------------- ------------------------------------- ------------------------------------- -------------------------- 17025bd8deadSopenharmony_ci 17035bd8deadSopenharmony_ci Also augment table 3.18 or 3.19 with the following column: 17045bd8deadSopenharmony_ci 17055bd8deadSopenharmony_ci Base NONE 17065bd8deadSopenharmony_ci Internal Format Texture Function 17075bd8deadSopenharmony_ci ================= ================ 17085bd8deadSopenharmony_ci ALPHA Rv = Rf 17095bd8deadSopenharmony_ci Gv = Gf 17105bd8deadSopenharmony_ci Bv = Bf 17115bd8deadSopenharmony_ci Av = Af 17125bd8deadSopenharmony_ci ----------------- ---------------- 17135bd8deadSopenharmony_ci LUMINANCE Rv = Rf 17145bd8deadSopenharmony_ci (or 1) Gv = Gf 17155bd8deadSopenharmony_ci Bv = Bf 17165bd8deadSopenharmony_ci Av = Af 17175bd8deadSopenharmony_ci ----------------- ---------------- 17185bd8deadSopenharmony_ci LUMINANCE_ALPHA Rv = Rf 17195bd8deadSopenharmony_ci (or 2) Gv = Gf 17205bd8deadSopenharmony_ci Bv = Bf 17215bd8deadSopenharmony_ci Av = Af 17225bd8deadSopenharmony_ci ----------------- ---------------- 17235bd8deadSopenharmony_ci INTENSITY Rv = Rf 17245bd8deadSopenharmony_ci Gv = Gf 17255bd8deadSopenharmony_ci Bv = Bf 17265bd8deadSopenharmony_ci Av = Af 17275bd8deadSopenharmony_ci ----------------- ---------------- 17285bd8deadSopenharmony_ci RGB Rv = Rf 17295bd8deadSopenharmony_ci (or 3) Gv = Gf 17305bd8deadSopenharmony_ci Bv = Bf 17315bd8deadSopenharmony_ci Av = Af 17325bd8deadSopenharmony_ci ----------------- ---------------- 17335bd8deadSopenharmony_ci RGBA Rv = Rf 17345bd8deadSopenharmony_ci (or 4) Gv = Gf 17355bd8deadSopenharmony_ci Bv = Bf 17365bd8deadSopenharmony_ci Av = Af 17375bd8deadSopenharmony_ci ----------------- ---------------- 17385bd8deadSopenharmony_ci 17395bd8deadSopenharmony_ci Amend tables 3.21 and 3.22 in the ARB_texture_env_combine 17405bd8deadSopenharmony_ci specification (or EXT_texture_env_combine specification) to require 17415bd8deadSopenharmony_ci inputs to be clamped positive (the TEXTURE<n>_ARB entries apply 17425bd8deadSopenharmony_ci only if NV_texture_env_combine4 is supported): 17435bd8deadSopenharmony_ci 17445bd8deadSopenharmony_ci SOURCE<n>_RGB_EXT OPERAND<n>_RGB_EXT Argument 17455bd8deadSopenharmony_ci ----------------- -------------- -------- 17465bd8deadSopenharmony_ci TEXTURE SRC_COLOR max(0,Ct) 17475bd8deadSopenharmony_ci ONE_MINUS_SRC_COLOR (1-max(0,Ct)) 17485bd8deadSopenharmony_ci SRC_ALPHA max(0,At) 17495bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-max(0,At)) 17505bd8deadSopenharmony_ci CONSTANT_EXT SRC_COLOR max(0,Cc 17515bd8deadSopenharmony_ci ONE_MINUS_SRC_COLOR (1-max(0,Cc) 17525bd8deadSopenharmony_ci SRC_ALPHA max(0,Ac 17535bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-max(0,Ac) 17545bd8deadSopenharmony_ci PRIMARY_COLOR_EXT SRC_COLOR max(0,Cf 17555bd8deadSopenharmony_ci ONE_MINUS_SRC_COLOR (1-max(0,Cf) 17565bd8deadSopenharmony_ci SRC_ALPHA max(0,Af 17575bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-max(0,Af) 17585bd8deadSopenharmony_ci PREVIOUS_EXT SRC_COLOR max(0,Cp 17595bd8deadSopenharmony_ci ONE_MINUS_SRC_COLOR (1-max(0,Cp) 17605bd8deadSopenharmony_ci SRC_ALPHA max(0,Ap 17615bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-max(0,Ap) 17625bd8deadSopenharmony_ci TEXTURE<n>_ARB SRC_COLOR max(0,Ct<n>) 17635bd8deadSopenharmony_ci ONE_MINUS_SRC_COLOR (1-max(0,Ct<n>)) 17645bd8deadSopenharmony_ci SRC_ALPHA max(0,At<n>) 17655bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-max(0,At<n>)) 17665bd8deadSopenharmony_ci 17675bd8deadSopenharmony_ci Table 3.21: Arguments for COMBINE_RGB_ARB (or COMBINE_RGB_EXT) 17685bd8deadSopenharmony_ci functions 17695bd8deadSopenharmony_ci 17705bd8deadSopenharmony_ci SOURCE<n>_ALPHA_EXT OPERAND<n>_ALPHA_EXT Argument 17715bd8deadSopenharmony_ci ----------------- -------------- -------- 17725bd8deadSopenharmony_ci TEXTURE SRC_ALPHA max(0,At) 17735bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-max(0,At)) 17745bd8deadSopenharmony_ci CONSTANT_EXT SRC_ALPHA max(0,Ac) 17755bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-max(0,Ac)) 17765bd8deadSopenharmony_ci PRIMARY_COLOR_EXT SRC_ALPHA max(0,Af) 17775bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-max(0,Af)) 17785bd8deadSopenharmony_ci PREVIOUS_EXT SRC_ALPHA max(0,Ap) 17795bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-max(0,Ap)) 17805bd8deadSopenharmony_ci TEXTURE<n>_ARB SRC_ALPHA max(0,At<n>) 17815bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-max(0,At<n>)) 17825bd8deadSopenharmony_ci 17835bd8deadSopenharmony_ci Table 3.22: Arguments for COMBINE_ALPHA_ARB (or COMBINE_ALPHA_EXT) 17845bd8deadSopenharmony_ci functions 17855bd8deadSopenharmony_ci 17865bd8deadSopenharmony_ci -- Section 3.9 "Color Sum" 17875bd8deadSopenharmony_ci 17885bd8deadSopenharmony_ci Update the first paragraph to read: 17895bd8deadSopenharmony_ci 17905bd8deadSopenharmony_ci "At the beginning of color sum, a fragment has two RGBA colors: a 17915bd8deadSopenharmony_ci primary color cpri (which texturing, if enabled, may have modified) 17925bd8deadSopenharmony_ci and a secondary color csec. The components of these two colors are 17935bd8deadSopenharmony_ci clamped to [0,1] and then summed to produce a single post-texturing 17945bd8deadSopenharmony_ci RGBA color c. The components of c are then clamped to the range 17955bd8deadSopenharmony_ci [0,1]." 17965bd8deadSopenharmony_ci 17975bd8deadSopenharmony_ci -- NEW Section 3.8.13 "Texture Shaders" 17985bd8deadSopenharmony_ci 17995bd8deadSopenharmony_ci "Each texture unit is configured with one of twenty-one 18005bd8deadSopenharmony_ci texture shader operations. Several texture shader operations 18015bd8deadSopenharmony_ci require additional state. All per-texture shader stage state 18025bd8deadSopenharmony_ci is specified using the TexEnv commands with the target specified 18035bd8deadSopenharmony_ci as TEXTURE_SHADER_NV. The per-texture shader state is replicated 18045bd8deadSopenharmony_ci per texture unit so the texture unit selected by ActiveTextureARB 18055bd8deadSopenharmony_ci determines which texture unit's environment is modified by TexEnv 18065bd8deadSopenharmony_ci calls. 18075bd8deadSopenharmony_ci 18085bd8deadSopenharmony_ci When calling TexEnv with a target of TEXTURE_SHADER_NV, 18095bd8deadSopenharmony_ci pname must be one of SHADER_OPERATION_NV, CULL_MODES_NV, 18105bd8deadSopenharmony_ci OFFSET_TEXTURE_MATRIX_NV, OFFSET_TEXTURE_SCALE_NV, 18115bd8deadSopenharmony_ci OFFSET_TEXTURE_BIAS_NV, PREVIOUS_TEXTURE_INPUT_NV, or CONST_EYE_NV. 18125bd8deadSopenharmony_ci 18135bd8deadSopenharmony_ci When TexEnv is called with the target of TEXTURE_SHADER_NV, 18145bd8deadSopenharmony_ci SHADER_OPERATION_NV may be set to one of NONE, 18155bd8deadSopenharmony_ci TEXTURE_1D, TEXTURE_2D, TEXTURE_CUBE_MAP_ARB, 18165bd8deadSopenharmony_ci PASS_THROUGH_NV, CULL_FRAGMENT_NV, OFFSET_TEXTURE_2D_NV, 18175bd8deadSopenharmony_ci OFFSET_TEXTURE_2D_SCALE_NV, OFFSET_TEXTURE_RECTANGLE_NV, 18185bd8deadSopenharmony_ci OFFSET_TEXTURE_RECTANGLE_SCALE_NV, DEPENDENT_AR_TEXTURE_2D_NV, 18195bd8deadSopenharmony_ci DEPENDENT_GB_TEXTURE_2D_NV, DOT_PRODUCT_NV, 18205bd8deadSopenharmony_ci DOT_PRODUCT_DEPTH_REPLACE_NV, DOT_PRODUCT_TEXTURE_2D_NV, 18215bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_RECTANGLE_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, 18225bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, or 18235bd8deadSopenharmony_ci DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. The semantics of each of 18245bd8deadSopenharmony_ci these shader operations is described in section 3.8.13.1. Not every 18255bd8deadSopenharmony_ci operation is supported in every texture unit. The restrictions for 18265bd8deadSopenharmony_ci how these shader operations can be configured in various texture 18275bd8deadSopenharmony_ci units are described in section 3.8.13.2. 18285bd8deadSopenharmony_ci 18295bd8deadSopenharmony_ci When TexEnv is called with the target of TEXTURE_SHADER_NV, 18305bd8deadSopenharmony_ci CULL_MODES_NV is set to a vector of four cull comparisons by 18315bd8deadSopenharmony_ci providing four symbolic tokens, each being either LESS or GEQUAL. 18325bd8deadSopenharmony_ci These cull modes are used by the CULL_FRAGMENT_NV operation (see 18335bd8deadSopenharmony_ci section 3.8.13.1.7). 18345bd8deadSopenharmony_ci 18355bd8deadSopenharmony_ci When TexEnv is called with the target of TEXTURE_SHADER_NV, 18365bd8deadSopenharmony_ci RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV may be set to either 18375bd8deadSopenharmony_ci UNSIGNED_IDENTITY_NV or EXPAND_NORMAL_NV. This RGBA unsigned dot 18385bd8deadSopenharmony_ci product mapping mode is used by the DOT_PRODUCT_NV operation (see 18395bd8deadSopenharmony_ci section 3.8.13.1.14) and other operations that compute dot products. 18405bd8deadSopenharmony_ci 18415bd8deadSopenharmony_ci When TexEnv is called with the target of TEXTURE_SHADER_NV, 18425bd8deadSopenharmony_ci PREVIOUS_TEXTURE_INPUT_NV may be set to TEXTUREi_ARB where i is 18435bd8deadSopenharmony_ci between 0 and n-1 where n is the implementation-dependent number of 18445bd8deadSopenharmony_ci texture units supported. The INVALID_OPERATION error is generated 18455bd8deadSopenharmony_ci if i is greater than or equal to the current active texture unit. 18465bd8deadSopenharmony_ci 18475bd8deadSopenharmony_ci When TexEnv is called with the target of TEXTURE_SHADER_NV, 18485bd8deadSopenharmony_ci OFFSET_TEXTURE_MATRIX_NV may be set to a 2x2 matrix of floating-point 18495bd8deadSopenharmony_ci values stored in column-major order as 4 consecutive floating-point 18505bd8deadSopenharmony_ci values, i.e. as: 18515bd8deadSopenharmony_ci 18525bd8deadSopenharmony_ci [ a1 a3 ] 18535bd8deadSopenharmony_ci [ a2 a4 ] 18545bd8deadSopenharmony_ci 18555bd8deadSopenharmony_ci This matrix is used by the OFFSET_TEXTURE_2D_NV, 18565bd8deadSopenharmony_ci OFFSET_TEXTURE_2D_SCALE_NV, OFFSET_TEXTURE_RECTANGLE_NV, and 18575bd8deadSopenharmony_ci OFFSET_TEXTURE_RECTANGLE_SCALE_NV operations (see sections 3.8.13.1.8 18585bd8deadSopenharmony_ci through 3.8.13.1.11). 18595bd8deadSopenharmony_ci 18605bd8deadSopenharmony_ci When TexEnv is called with the target of TEXTURE_SHADER_NV, 18615bd8deadSopenharmony_ci OFFSET_TEXTURE_SCALE_NV may be set to a floating-point value. 18625bd8deadSopenharmony_ci When TexEnv is called with the target of TEXTURE_SHADER_NV, 18635bd8deadSopenharmony_ci OFFSET_TEXTURE_BIAS_NV may be set to a floating-point value. These 18645bd8deadSopenharmony_ci scale and bias values are used by the OFFSET_TEXTURE_2D_SCALE_NV 18655bd8deadSopenharmony_ci and OFFSET_TEXTURE_RECTANGLE_SCALE_NV operations (see section 18665bd8deadSopenharmony_ci 3.8.13.1.9 and 3.8.13.1.11). 18675bd8deadSopenharmony_ci 18685bd8deadSopenharmony_ci When TexEnv is called with the target of TEXTURE_SHADER_NV, 18695bd8deadSopenharmony_ci CONST_EYE_NV is set to a vector of three floating-point 18705bd8deadSopenharmony_ci values used as the constant eye vector in the 18715bd8deadSopenharmony_ci DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV texture shader (see 18725bd8deadSopenharmony_ci section 3.8.13.1.19). 18735bd8deadSopenharmony_ci 18745bd8deadSopenharmony_ci 3.8.13.1 Texture Shader Operations 18755bd8deadSopenharmony_ci 18765bd8deadSopenharmony_ci The texture enables described in section 3.8.10 only affect 18775bd8deadSopenharmony_ci conventional texturing mode; these enables are ignored when 18785bd8deadSopenharmony_ci TEXTURE_SHADER_NV is enabled. Instead, the texture shader operation 18795bd8deadSopenharmony_ci determines how texture coordinates are mapped to filtered texture 18805bd8deadSopenharmony_ci values. 18815bd8deadSopenharmony_ci 18825bd8deadSopenharmony_ci Tables 3.A, 3.B, 3.C, and 3.D specify inter-stage dependencies, 18835bd8deadSopenharmony_ci texture target dependencies, relevant inputs, and result types and 18845bd8deadSopenharmony_ci values respectively for each texture shader operation. Table 3.E 18855bd8deadSopenharmony_ci specifies how the components of an accessed texture are mapped to 18865bd8deadSopenharmony_ci the components of the texture unit RGBA result based on the base 18875bd8deadSopenharmony_ci internal format of the accessed texture. The following discussion 18885bd8deadSopenharmony_ci describes each possible texture shader operation in detail. 18895bd8deadSopenharmony_ci 18905bd8deadSopenharmony_ci texture shader 18915bd8deadSopenharmony_citexture shader operation i previous texture input texture shader operation i-1 operation i-2 texture shader operation i+1 18925bd8deadSopenharmony_ci================================= ========================= =============================== ================ ================================ 18935bd8deadSopenharmony_ciNONE - - - - 18945bd8deadSopenharmony_ci--------------------------------- ------------------------- ------------------------------- ---------------- -------------------------------- 18955bd8deadSopenharmony_ciTEXTURE_1D - - - - 18965bd8deadSopenharmony_ciTEXTURE_2D - - - - 18975bd8deadSopenharmony_ciTEXTURE_RECTANGLE_NV - - - - 18985bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_ARB - - - - 18995bd8deadSopenharmony_ci--------------------------------- ------------------------- ------------------------------- ---------------- -------------------------------- 19005bd8deadSopenharmony_ciPASS_THROUGH_NV - - - - 19015bd8deadSopenharmony_ciCULL_FRAGMENT_NV - - - - 19025bd8deadSopenharmony_ci--------------------------------- ------------------------- ------------------------------- ---------------- -------------------------------- 19035bd8deadSopenharmony_ciOFFSET_TEXTURE_2D_NV base internal texture - - - 19045bd8deadSopenharmony_ci format must be one of 19055bd8deadSopenharmony_ci DSDT_NV, DSDT_MAG_NV, or 19065bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV 19075bd8deadSopenharmony_ciOFFSET_TEXTURE_2D_SCALE_NV base internal texture - - - 19085bd8deadSopenharmony_ci format must be either 19095bd8deadSopenharmony_ci DSDT_MAG_NV or 19105bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV 19115bd8deadSopenharmony_ciOFFSET_TEXTURE_RECTANGLE_NV base internal texture - - - 19125bd8deadSopenharmony_ci format must be one of 19135bd8deadSopenharmony_ci DSDT_NV, DSDT_MAG_NV, or 19145bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV 19155bd8deadSopenharmony_ciOFFSET_TEXTURE_RECTANGLE_SCALE_NV base internal texture - - - 19165bd8deadSopenharmony_ci format must be either 19175bd8deadSopenharmony_ci DSDT_MAG_NV or 19185bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV 19195bd8deadSopenharmony_ci--------------------------------- ------------------------- ------------------------------- ---------------- -------------------------------- 19205bd8deadSopenharmony_ciDEPENDENT_AR_TEXTURE_2D_NV shader result type must - - - 19215bd8deadSopenharmony_ci all be unsigned RGBA 19225bd8deadSopenharmony_ciDEPENDENT_GB_TEXTURE_2D_NV shader result type must - - - 19235bd8deadSopenharmony_ci all be unsigned RGBA 19245bd8deadSopenharmony_ci--------------------------------- ------------------------- ------------------------------- ---------------- -------------------------------- 19255bd8deadSopenharmony_ciDOT_PRODUCT_NV shader result type must - - - 19265bd8deadSopenharmony_ci be one of signed HILO, 19275bd8deadSopenharmony_ci unsigned HILO, all 19285bd8deadSopenharmony_ci signed RGBA, or all 19295bd8deadSopenharmony_ci unsigned RGBA 19305bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_2D_NV shader result type must shader operation must be - - 19315bd8deadSopenharmony_ci be one of signed HILO, DOT_PRODUCT_NV 19325bd8deadSopenharmony_ci unsigned HILO, all 19335bd8deadSopenharmony_ci signed RGBA, or all 19345bd8deadSopenharmony_ci unsigned RGBA 19355bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_RECTANGLE_NV shader result type must shader operation must be - - 19365bd8deadSopenharmony_ci be one of signed HILO, DOT_PRODUCT_NV 19375bd8deadSopenharmony_ci unsigned HILO, all 19385bd8deadSopenharmony_ci signed RGBA, all 19395bd8deadSopenharmony_ci unsigned RGBA 19405bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_CUBE_MAP_NV shader result type must shader operation shader operation - 19415bd8deadSopenharmony_ci be one of signed HILO, must be must be 19425bd8deadSopenharmony_ci unsigned HILO, all DOT_PRODUCT_NV DOT_PRODUCT_NV 19435bd8deadSopenharmony_ci signed RGBA, or all 19445bd8deadSopenharmony_ci unsigned RGBA 19455bd8deadSopenharmony_ciDOT_PRODUCT_REFLECT_CUBE_MAP_NV shader result type must shader operation must be shader operation - 19465bd8deadSopenharmony_ci be one of signed HILO, DOT_PRODUCT_NV or must be 19475bd8deadSopenharmony_ci unsigned HILO, all DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV DOT_PRODUCT_NV 19485bd8deadSopenharmony_ci signed RGBA, or all 19495bd8deadSopenharmony_ci unsigned RGBA; previous 19505bd8deadSopenharmony_ci texture input must not 19515bd8deadSopenharmony_ci be unit i-1 19525bd8deadSopenharmony_ciDOT_PRODUCT_CONST_EYE_- shader result type must shader operation shader operation - 19535bd8deadSopenharmony_ci REFLECT_CUBE_MAP_NV be one of signed HILO, must be must be 19545bd8deadSopenharmony_ci unsigned HILO, all DOT_PRODUCT_NV or DOT_PRODUCT_NV 19555bd8deadSopenharmony_ci signed RGBA, or all DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 19565bd8deadSopenharmony_ci unsigned RGBA 19575bd8deadSopenharmony_ciDOT_PRODUCT_DIFFUSE_CUBE_MAP_NV shader result type must shader operation must be - shader operation must be 19585bd8deadSopenharmony_ci be one of signed HILO, DOT_PRODUCT_NV DOT_PRODUCT_REFLECT_CUBE_MAP_NV 19595bd8deadSopenharmony_ci unsigned HILO, all or DOT_PRODUCT_CONST_EYE_- 19605bd8deadSopenharmony_ci signed RGBA, or all REFLECT_CUBE_MAP_NV 19615bd8deadSopenharmony_ci unsigned RGBA 19625bd8deadSopenharmony_ci--------------------------------- ------------------------- ------------------------------- ---------------- -------------------------------- 19635bd8deadSopenharmony_ciDOT_PRODUCT_DEPTH_REPLACE_NV shader result type must shader operation - - 19645bd8deadSopenharmony_ci be one of signed HILO, must be 19655bd8deadSopenharmony_ci unsigned HILO, all DOT_PRODUCT_NV 19665bd8deadSopenharmony_ci signed RGBA, or all 19675bd8deadSopenharmony_ci unsigned RGBA 19685bd8deadSopenharmony_ci--------------------------------- ------------------------- ------------------------------- ---------------- -------------------------------- 19695bd8deadSopenharmony_ci 19705bd8deadSopenharmony_ciTable 3.A: Texture shader inter-stage dependencies for each operation. 19715bd8deadSopenharmony_ciIf any one of the dependencies listed above is not met, the texture 19725bd8deadSopenharmony_cishader stage is considered inconsistent. Further texture shader target 19735bd8deadSopenharmony_cidependencies are listed in table X.Y. Additionally, if any one of the 19745bd8deadSopenharmony_citexture shader stages that a particular texture shader stage depends on is 19755bd8deadSopenharmony_ciinconsistent, then the dependent texture shader stage is also considered 19765bd8deadSopenharmony_ciinconsistent. When a texture shader stage is considered inconsistent, 19775bd8deadSopenharmony_cithe inconsistent stage operates as if the stage's operation is NONE. 19785bd8deadSopenharmony_ci 19795bd8deadSopenharmony_citexture shader operation i texture unit i 19805bd8deadSopenharmony_ci================================= ======================================= 19815bd8deadSopenharmony_ciNONE - 19825bd8deadSopenharmony_ci--------------------------------- --------------------------------------- 19835bd8deadSopenharmony_ciTEXTURE_1D 1D target must be consistent 19845bd8deadSopenharmony_ciTEXTURE_2D 2D target must be consistent 19855bd8deadSopenharmony_ciTEXTURE_RECTANGLE_NV rectangle target must be consistent 19865bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_ARB cube map target must be consistent 19875bd8deadSopenharmony_ci--------------------------------- --------------------------------------- 19885bd8deadSopenharmony_ciPASS_THROUGH_NV - 19895bd8deadSopenharmony_ciCULL_FRAGMENT_NV - 19905bd8deadSopenharmony_ci--------------------------------- --------------------------------------- 19915bd8deadSopenharmony_ciOFFSET_TEXTURE_2D_NV 2D target must be consistent 19925bd8deadSopenharmony_ciOFFSET_TEXTURE_2D_SCALE_NV 2D target must be consistent 19935bd8deadSopenharmony_ci and 2D texture target type must 19945bd8deadSopenharmony_ci be unsigned RGBA 19955bd8deadSopenharmony_ciOFFSET_TEXTURE_RECTANGLE_NV rectangle target must be consistent 19965bd8deadSopenharmony_ciOFFSET_TEXTURE_RECTANGLE_SCALE_NV rectangle target must be consistent 19975bd8deadSopenharmony_ci and rectangle texture target type must 19985bd8deadSopenharmony_ci be unsigned RGBA 19995bd8deadSopenharmony_ci--------------------------------- --------------------------------------- 20005bd8deadSopenharmony_ciDEPENDENT_AR_TEXTURE_2D_NV 2D target must be consistent 20015bd8deadSopenharmony_ciDEPENDENT_GB_TEXTURE_2D_NV 2D target must be consistent 20025bd8deadSopenharmony_ci--------------------------------- --------------------------------------- 20035bd8deadSopenharmony_ciDOT_PRODUCT_NV - 20045bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_2D_NV 2D target must be consistent 20055bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_RECTANGLE_NV rectangle target must be consistent 20065bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_CUBE_MAP_NV cube map target must be consistent 20075bd8deadSopenharmony_ciDOT_PRODUCT_REFLECT_CUBE_MAP_NV cube map target must be consistent 20085bd8deadSopenharmony_ciDOT_PRODUCT_CONST_EYE_- cube map target must be consistent 20095bd8deadSopenharmony_ci REFLECT_CUBE_MAP_NV 20105bd8deadSopenharmony_ciDOT_PRODUCT_DIFFUSE_CUBE_MAP_NV cube map target must be consistent 20115bd8deadSopenharmony_ci--------------------------------- --------------------------------------- 20125bd8deadSopenharmony_ciDOT_PRODUCT_DEPTH_REPLACE_NV - 20135bd8deadSopenharmony_ci--------------------------------- --------------------------------------- 20145bd8deadSopenharmony_ci 20155bd8deadSopenharmony_ciTable 3.B: Texture shader target dependencies for each operation. 20165bd8deadSopenharmony_ciIf the dependency listed above is not met, the texture shader stage is 20175bd8deadSopenharmony_ciconsidered inconsistent. 20185bd8deadSopenharmony_ci 20195bd8deadSopenharmony_ci uses uses uses uses uses offset uses 20205bd8deadSopenharmony_ci texture stage stage stage previous uses offset texture const 20215bd8deadSopenharmony_ci coordinate texture result result result texture cull texture 2D scale eye 20225bd8deadSopenharmony_citexture shader operation i set usage target i-1 i-2 i+1 input modes 2D matrix and bias vector 20235bd8deadSopenharmony_ci================================= ========== ========= ====== ====== ====== ======== ===== ========= ======== ====== 20245bd8deadSopenharmony_ciNONE - - - - - - - - - - 20255bd8deadSopenharmony_ci--------------------------------- ---------- --------- ------ ------ ------ -------- ----- --------- -------- ------ 20265bd8deadSopenharmony_ciTEXTURE_1D s,q 1D - - - - - - - - 20275bd8deadSopenharmony_ciTEXTURE_2D s,t,q 2D - - - - - - - - 20285bd8deadSopenharmony_ciTEXTURE_RECTANGLE_NV s,t,q rectangle - - - - - - - - 20295bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_ARB s,t,r cube map - - - - - - - - 20305bd8deadSopenharmony_ci--------------------------------- ---------- --------- ------ ------ ------ -------- ----- --------- -------- ------ 20315bd8deadSopenharmony_ciPASS_THROUGH_NV s,t,r,q - - - - - - - - - 20325bd8deadSopenharmony_ciCULL_FRAGMENT_NV s,t,r,q - - - - - y - - - 20335bd8deadSopenharmony_ci--------------------------------- ---------- --------- ------ ------ ------ -------- ----- --------- -------- ------ 20345bd8deadSopenharmony_ciOFFSET_TEXTURE_2D_NV s,t 2D - - - y - y - - 20355bd8deadSopenharmony_ciOFFSET_TEXTURE_2D_SCALE_NV s,t 2D - - - y - y y - 20365bd8deadSopenharmony_ciOFFSET_TEXTURE_RECTANGLE_NV s,t rectangle - - - y - y - - 20375bd8deadSopenharmony_ciOFFSET_TEXTURE_RECTANGLE_SCALE_NV s,t rectangle - - - y - y y - 20385bd8deadSopenharmony_ci--------------------------------- ---------- --------- ------ ------ ------ -------- ----- --------- -------- ------ 20395bd8deadSopenharmony_ciDEPENDENT_AR_TEXTURE_2D_NV - 2D - - - y - - - - 20405bd8deadSopenharmony_ciDEPENDENT_GB_TEXTURE_2D_NV - 2D - - - y - - - - 20415bd8deadSopenharmony_ci--------------------------------- ---------- --------- ------ ------ ------ -------- ----- --------- -------- ------ 20425bd8deadSopenharmony_ciDOT_PRODUCT_NV s,t,r (q*) - - - - y - - - - 20435bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_2D_NV s,t,r 2D y - - y - - - - 20445bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_RECTANGLE_NV s,t,r rectangle y - - y - - - - 20455bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_CUBE_MAP_NV s,t,r cube map y y - y - - - - 20465bd8deadSopenharmony_ciDOT_PRODUCT_REFLECT_CUBE_MAP_NV s,t,r,q cube map y y - y - - - - 20475bd8deadSopenharmony_ciDOT_PRODUCT_CONST_EYE_- s,t,r cube map y y - y - - - y 20485bd8deadSopenharmony_ci REFLECT_CUBE_MAP_NV 20495bd8deadSopenharmony_ciDOT_PRODUCT_DIFFUSE_CUBE_MAP_NV s,t,r (q*) cube map y y y y - - - - 20505bd8deadSopenharmony_ci--------------------------------- ---------- --------- ------ ------ ------ -------- ----- --------- -------- ------ 20515bd8deadSopenharmony_ciDOT_PRODUCT_DEPTH_REPLACE_NV s,t,r - y - - y - - - - 20525bd8deadSopenharmony_ci--------------------------------- ---------- --------- ------ ------ ------ -------- ----- --------- -------- ------ 20535bd8deadSopenharmony_ci 20545bd8deadSopenharmony_ciTable 3.C: Relevant texture shader computation inputs for each 20555bd8deadSopenharmony_cioperation. The (q*) for the texture coordinate set usage indicates 20565bd8deadSopenharmony_cithat the q texture coordinate is used only when the DOT_PRODUCT_NV and 20575bd8deadSopenharmony_ciDOT_PRODUCT_DIFFUSE_CUBE_MAP_NV operations are used in conjunction with 20585bd8deadSopenharmony_ciDOT_PRODUCT_REFLECT_CUBE_MAP_NV. 20595bd8deadSopenharmony_ci 20605bd8deadSopenharmony_citexture shader operation i shader stage result type shader stage result texture unit RGBA color result 20615bd8deadSopenharmony_ci================================= ============================= =================================== ====================================== 20625bd8deadSopenharmony_ciNONE unsigned RGBA invalid (0,0,0,0) 20635bd8deadSopenharmony_ci--------------------------------- ----------------------------- ----------------------------------- -------------------------------------- 20645bd8deadSopenharmony_ciTEXTURE_1D matches 1D target type filtered 1D target texel if 1D target texture type is RGBA, 20655bd8deadSopenharmony_ci filtered 1D target texel, 20665bd8deadSopenharmony_ci else (0,0,0,0) 20675bd8deadSopenharmony_ciTEXTURE_2D matches 2D target type filtered 2D target texel if 2D target texture type is RGBA, 20685bd8deadSopenharmony_ci filtered 2D target texel, 20695bd8deadSopenharmony_ci else (0,0,0,0) 20705bd8deadSopenharmony_ciTEXTURE_RECTANGLE_NV matches rectangle target type filtered rectangle target texel if rectangle target texture type is 20715bd8deadSopenharmony_ci RGBA, filtered rectangle target 20725bd8deadSopenharmony_ci texel, else (0,0,0,0) 20735bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_ARB matches cube map target type filtered cube map target texel if cube map target texture type is 20745bd8deadSopenharmony_ci RGBA, filtered cube map target 20755bd8deadSopenharmony_ci texel, else (0,0,0,0) 20765bd8deadSopenharmony_ci--------------------------------- ----------------------------- ----------------------------------- -------------------------------------- 20775bd8deadSopenharmony_ciPASS_THROUGH_NV unsigned RGBA (max(0,min(1,s)), max(0,min(1,t)), (max(0,min(1,s)), max(0,min(1,t)), 20785bd8deadSopenharmony_ci max(0,min(1,r)), max(0,min(1,q))) max(0,min(1,r)), max(0,min(1,q))) 20795bd8deadSopenharmony_ciCULL_FRAGMENT_NV unsigned RGBA invalid (0,0,0,0) 20805bd8deadSopenharmony_ci--------------------------------- ----------------------------- ----------------------------------- -------------------------------------- 20815bd8deadSopenharmony_ciOFFSET_TEXTURE_2D_NV matches 2D target type filtered 2D target texel if 2D target texture type is RGBA, 20825bd8deadSopenharmony_ci filtered 2D target texel, 20835bd8deadSopenharmony_ci else (0,0,0,0) 20845bd8deadSopenharmony_ciOFFSET_TEXTURE_2D_SCALE_NV unsigned RGBA filtered 2D target texel scaled filtered 2D target texel 20855bd8deadSopenharmony_ciOFFSET_TEXTURE_RECTANGLE_NV matches rectangle target type filtered rectangle target texel if rectangle target texture type is 20865bd8deadSopenharmony_ci RGBA, filtered rectangle target 20875bd8deadSopenharmony_ci texel, else (0,0,0,0) 20885bd8deadSopenharmony_ciOFFSET_TEXTURE_RECTANGLE_SCALE_NV unsigned RGBA filtered rectangle target texel scaled filtered rectangle target texel 20895bd8deadSopenharmony_ci--------------------------------- ----------------------------- ----------------------------------- -------------------------------------- 20905bd8deadSopenharmony_ciDEPENDENT_AR_TEXTURE_2D_NV matches 2D target type filtered 2D target texel if 2D target texture type is RGBA, 20915bd8deadSopenharmony_ci filtered 2D target texel, 20925bd8deadSopenharmony_ci else (0,0,0,0) 20935bd8deadSopenharmony_ciDEPENDENT_GB_TEXTURE_2D_NV matches 2D target type filtered 2D target texel if 2D target texture type is RGBA, 20945bd8deadSopenharmony_ci filtered 2D target texel, 20955bd8deadSopenharmony_ci else (0,0,0,0) 20965bd8deadSopenharmony_ci--------------------------------- ----------------------------- ----------------------------------- -------------------------------------- 20975bd8deadSopenharmony_ciDOT_PRODUCT_NV float dot product (0,0,0,0) 20985bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_2D_NV matches 2D target type filtered 2D target texel if 2D target texture type is RGBA, 20995bd8deadSopenharmony_ci filtered 2D target texel, 21005bd8deadSopenharmony_ci else (0,0,0,0) 21015bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_RECTANGLE_NV matches rectangle target type filtered rectangle target texel if rectangle target texture type is 21025bd8deadSopenharmony_ci RGBA, filtered rectangle target 21035bd8deadSopenharmony_ci texel, else (0,0,0,0) 21045bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_CUBE_MAP_NV matches cube map target type filtered cube map target texel if cube map target texture type is 21055bd8deadSopenharmony_ci RGBA, filtered cube map target 21065bd8deadSopenharmony_ci texel, else (0,0,0,0) 21075bd8deadSopenharmony_ciDOT_PRODUCT_REFLECT_CUBE_MAP_NV matches cube map target type filtered cube map target texel if cube map target texture type is 21085bd8deadSopenharmony_ci RGBA, filtered cube map target 21095bd8deadSopenharmony_ci texel, else (0,0,0,0) 21105bd8deadSopenharmony_ciDOT_PRODUCT_CONST_EYE_- matches cube map target type filtered cube map target texel if cube map target texture type is 21115bd8deadSopenharmony_ci REFLECT_CUBE_MAP_NV RGBA, filtered cube map target 21125bd8deadSopenharmony_ci texel, else (0,0,0,0) 21135bd8deadSopenharmony_ciDOT_PRODUCT_DIFFUSE_CUBE_MAP_NV matches cube map target type filtered cube map target texel if cube map target texture type is 21145bd8deadSopenharmony_ci RGBA, filtered cube map target 21155bd8deadSopenharmony_ci texel, else (0,0,0,0) 21165bd8deadSopenharmony_ci------------------------------- ----------------------------- ----------------------------------- -------------------------------------- 21175bd8deadSopenharmony_ciDOT_PRODUCT_DEPTH_REPLACE_NV unsigned RGBA invalid (0,0,0,0) 21185bd8deadSopenharmony_ci------------------------------- ----------------------------- ----------------------------------- -------------------------------------- 21195bd8deadSopenharmony_ci 21205bd8deadSopenharmony_ciTable 3.D: Texture shader stage results for each operation. 21215bd8deadSopenharmony_ci 21225bd8deadSopenharmony_ciBase internal format Red Green Blue Alpha 21235bd8deadSopenharmony_ci-------------------- --- ----- ---- ----- 21245bd8deadSopenharmony_ciALPHA 1 1 1 At 21255bd8deadSopenharmony_ciLUMINANCE Lt Lt Lt 1 21265bd8deadSopenharmony_ciINTENSITY It It It It 21275bd8deadSopenharmony_ciLUMINANCE_ALPHA Lt Lt Lt At 21285bd8deadSopenharmony_ciRGB Rt Gt Bt 1 21295bd8deadSopenharmony_ciRGBA Rt Gt Bt At 21305bd8deadSopenharmony_ci 21315bd8deadSopenharmony_ciTable 3.E: How base internal formats components are mapped to RGBA values 21325bd8deadSopenharmony_cifor texture shaders (note that the mapping for ALPHA is different from 21335bd8deadSopenharmony_cithe mapping in Table 3.23 in the EXT_texture_env_combine extension). 21345bd8deadSopenharmony_ci 21355bd8deadSopenharmony_ci 3.8.13.1.1 None 21365bd8deadSopenharmony_ci 21375bd8deadSopenharmony_ci The NONE texture shader operation ignores the texture unit's texture 21385bd8deadSopenharmony_ci coordinate set and always generates the texture unit RGBA result 21395bd8deadSopenharmony_ci (0,0,0,0) for its filtered texel value. The texture shader result 21405bd8deadSopenharmony_ci is invalid. This texture shader stage is always consistent. 21415bd8deadSopenharmony_ci 21425bd8deadSopenharmony_ci When a texture unit is not needed while texture shaders are enabled, 21435bd8deadSopenharmony_ci it is most efficient to set the texture unit's texture shader 21445bd8deadSopenharmony_ci operation to NONE. 21455bd8deadSopenharmony_ci 21465bd8deadSopenharmony_ci 3.8.13.1.2 1D Projective Texturing 21475bd8deadSopenharmony_ci 21485bd8deadSopenharmony_ci The TEXTURE_1D texture shader operation accesses the texture unit's 21495bd8deadSopenharmony_ci 1D texture object (as described in sections 3.8.4, 3.8.5, and 3.8.6) 21505bd8deadSopenharmony_ci using (s/q) for the 1D texture coordinate where s and q are the 21515bd8deadSopenharmony_ci homogeneous texture coordinates for the texture unit. The result 21525bd8deadSopenharmony_ci of the texture access becomes both the shader result and texture 21535bd8deadSopenharmony_ci unit RGBA result (see table 3.E). The type of the shader result 21545bd8deadSopenharmony_ci depends on the format type of the accessed texture. This mode is 21555bd8deadSopenharmony_ci equivalent to conventional texturing's 1D texture target. 21565bd8deadSopenharmony_ci 21575bd8deadSopenharmony_ci If the texture unit's 1D texture object is not consistent, then 21585bd8deadSopenharmony_ci this texture shader stage is not consistent. 21595bd8deadSopenharmony_ci 21605bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 21615bd8deadSopenharmony_ci it is the NONE operation. 21625bd8deadSopenharmony_ci 21635bd8deadSopenharmony_ci 3.8.13.1.3 2D Projective Texturing 21645bd8deadSopenharmony_ci 21655bd8deadSopenharmony_ci The TEXTURE_2D texture shader operation accesses the texture unit's 21665bd8deadSopenharmony_ci 2D texture object (as described in sections 3.8.4, 3.8.5, and 21675bd8deadSopenharmony_ci 3.8.6) using (s/q,t/q) for the 2D texture coordinates where s, t, 21685bd8deadSopenharmony_ci and q are the homogeneous texture coordinates for the texture unit. 21695bd8deadSopenharmony_ci The result of the texture access becomes both the shader result and 21705bd8deadSopenharmony_ci texture unit RGBA result (see table 3.E). The type of the shader 21715bd8deadSopenharmony_ci result depends on the format type of the accessed texture. This mode 21725bd8deadSopenharmony_ci is equivalent to conventional texturing's 2D texture target. 21735bd8deadSopenharmony_ci 21745bd8deadSopenharmony_ci If the texture unit's 2D texture object is not consistent, then 21755bd8deadSopenharmony_ci this texture shader stage is not consistent. 21765bd8deadSopenharmony_ci 21775bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 21785bd8deadSopenharmony_ci it is the NONE operation. 21795bd8deadSopenharmony_ci 21805bd8deadSopenharmony_ci 3.8.13.1.4 Rectangle Projective Texturing 21815bd8deadSopenharmony_ci 21825bd8deadSopenharmony_ci The TEXTURE_RECTANGLE_NV texture shader operation accesses 21835bd8deadSopenharmony_ci the texture unit's rectangle texture object (as described in 21845bd8deadSopenharmony_ci sections 3.8.4, 3.8.5, and 3.8.6) using (s/q,t/q) for the 2D texture 21855bd8deadSopenharmony_ci coordinates where s, t, and q are the homogeneous texture coordinates 21865bd8deadSopenharmony_ci for the texture unit. The result of the texture access becomes both 21875bd8deadSopenharmony_ci the shader result and texture unit RGBA result (see table 3.E). 21885bd8deadSopenharmony_ci The type of the shader result depends on the format type of the 21895bd8deadSopenharmony_ci accessed texture. This mode is equivalent to NV_texture_rectangle's 21905bd8deadSopenharmony_ci rectangle texture target. 21915bd8deadSopenharmony_ci 21925bd8deadSopenharmony_ci If the texture unit's rectangle texture object is not consistent, 21935bd8deadSopenharmony_ci then this texture shader stage is not consistent. 21945bd8deadSopenharmony_ci 21955bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 21965bd8deadSopenharmony_ci it is the NONE operation. 21975bd8deadSopenharmony_ci 21985bd8deadSopenharmony_ci 3.8.13.1.5 Cube Map Texturing 21995bd8deadSopenharmony_ci 22005bd8deadSopenharmony_ci The TEXTURE_CUBE_MAP_ARB texture shader operation accesses 22015bd8deadSopenharmony_ci the texture unit's cube map texture object (as described in the 22025bd8deadSopenharmony_ci ARB_texture_cube_map specification) using (s,t,r) for the 3D texture 22035bd8deadSopenharmony_ci coordinate where s, t, and r are the homogeneous texture coordinates 22045bd8deadSopenharmony_ci for the texture unit. The result of the texture access becomes 22055bd8deadSopenharmony_ci both the shader result and texture unit RGBA result (see table 22065bd8deadSopenharmony_ci 3.E). The type of the shader result depends on the format type 22075bd8deadSopenharmony_ci of the accessed texture. This mode is equivalent to conventional 22085bd8deadSopenharmony_ci texturing's cube map texture target. 22095bd8deadSopenharmony_ci 22105bd8deadSopenharmony_ci If the texture unit's cube map texture object is not consistent, then 22115bd8deadSopenharmony_ci this texture shader stage is not consistent. 22125bd8deadSopenharmony_ci 22135bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 22145bd8deadSopenharmony_ci it is the NONE operation. 22155bd8deadSopenharmony_ci 22165bd8deadSopenharmony_ci 3.8.13.1.6 Pass Through 22175bd8deadSopenharmony_ci 22185bd8deadSopenharmony_ci The PASS_THROUGH_NV texture shader operation converts an (s,t,r,q) 22195bd8deadSopenharmony_ci texture coordinate set into an RGBA color result (r,g,b,a). 22205bd8deadSopenharmony_ci Each texture coordinate is first clamped to [0,1] before being 22215bd8deadSopenharmony_ci mapped to its corresponding color component. The texture shader 22225bd8deadSopenharmony_ci result and texture unit RGBA result of this operation are both 22235bd8deadSopenharmony_ci assigned the clamped RGBA color result. 22245bd8deadSopenharmony_ci 22255bd8deadSopenharmony_ci This operation in no way depends on any of the texture unit's 22265bd8deadSopenharmony_ci texture objects. 22275bd8deadSopenharmony_ci 22285bd8deadSopenharmony_ci 3.8.13.1.7 Cull Fragment 22295bd8deadSopenharmony_ci 22305bd8deadSopenharmony_ci The CULL_FRAGMENT_NV texture shader operation compares each 22315bd8deadSopenharmony_ci component of the texture coordinate set (s,t,r,q) to zero based 22325bd8deadSopenharmony_ci on the texture shader's corresponding cull mode. For the LESS 22335bd8deadSopenharmony_ci cull mode to succeed, the corresponding component must be less 22345bd8deadSopenharmony_ci than zero; otherwise the comparison fails. For the GEQUAL cull 22355bd8deadSopenharmony_ci mode to succeed, the corresponding component must be greater or 22365bd8deadSopenharmony_ci equal to zero; otherwise the comparison fails. If any of the four 22375bd8deadSopenharmony_ci comparisons fails, the fragment is discarded. 22385bd8deadSopenharmony_ci 22395bd8deadSopenharmony_ci The texture unit RGBA result generated is always (0,0,0,0). 22405bd8deadSopenharmony_ci The texture shader result is invalid. This texture shader stage 22415bd8deadSopenharmony_ci is always consistent. 22425bd8deadSopenharmony_ci 22435bd8deadSopenharmony_ci This operation in no way depends on any of the texture unit's 22445bd8deadSopenharmony_ci texture objects. 22455bd8deadSopenharmony_ci 22465bd8deadSopenharmony_ci 3.8.13.1.8 Offset Texture 2D 22475bd8deadSopenharmony_ci 22485bd8deadSopenharmony_ci The OFFSET_TEXTURE_2D_NV texture shader operation uses the 22495bd8deadSopenharmony_ci transformed result of a previous texture shader stage to perturb 22505bd8deadSopenharmony_ci the current texture shader stage's (s,t) texture coordinates 22515bd8deadSopenharmony_ci (without a projective division by q). The resulting perturbed 22525bd8deadSopenharmony_ci texture coordinates (s',t') are used to access the texture unit's 2D 22535bd8deadSopenharmony_ci texture object (as described in sections 3.8.4, 3.8.5, and 3.8.6). 22545bd8deadSopenharmony_ci 22555bd8deadSopenharmony_ci The result of the texture access becomes both the shader result and 22565bd8deadSopenharmony_ci texture unit RGBA result (see table 3.E). The type of the shader 22575bd8deadSopenharmony_ci result depends on the format type of the accessed texture. 22585bd8deadSopenharmony_ci 22595bd8deadSopenharmony_ci The perturbed texture coordinates s' and t' are computed with 22605bd8deadSopenharmony_ci floating-point math as follows: 22615bd8deadSopenharmony_ci 22625bd8deadSopenharmony_ci s' = s + a1 * DSprev + a3 * DTprev 22635bd8deadSopenharmony_ci t' = t + a2 * DSprev + a4 * DTprev 22645bd8deadSopenharmony_ci 22655bd8deadSopenharmony_ci where a1, a2, a3, and a4 are the texture shader stage's 22665bd8deadSopenharmony_ci OFFSET_TEXTURE_MATRIX_NV values, and DSprev and DTprev are the 22675bd8deadSopenharmony_ci (signed) DS and DT components of a previous texture shader unit's 22685bd8deadSopenharmony_ci texture shader result specified by the current texture shader 22695bd8deadSopenharmony_ci stage's PREVIOUS_TEXTURE_INPUT_NV value. 22705bd8deadSopenharmony_ci 22715bd8deadSopenharmony_ci If the texture unit's 2D texture object is not consistent, then 22725bd8deadSopenharmony_ci this texture shader stage is not consistent. 22735bd8deadSopenharmony_ci 22745bd8deadSopenharmony_ci If the previous texture input texture object specified by the 22755bd8deadSopenharmony_ci current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 22765bd8deadSopenharmony_ci has a base internalformat that is not one of DSDT_NV, DSDT_MAG_NV 22775bd8deadSopenharmony_ci or DSDT_MAG_INTENSITY_NV, then this texture shader stage is not 22785bd8deadSopenharmony_ci consistent. 22795bd8deadSopenharmony_ci 22805bd8deadSopenharmony_ci If the previous texture input texture shader operation specified by 22815bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 22825bd8deadSopenharmony_ci is DOT_PRODUCT_NV, then this texture shader stage is not consistent. 22835bd8deadSopenharmony_ci 22845bd8deadSopenharmony_ci If the previous texture input texture shader result specified by 22855bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 22865bd8deadSopenharmony_ci is invalid, then this texture shader stage is not consistent. 22875bd8deadSopenharmony_ci 22885bd8deadSopenharmony_ci If the previous texture input shader stage specified by the current 22895bd8deadSopenharmony_ci texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not 22905bd8deadSopenharmony_ci consistent, then this texture shader stage is not consistent. 22915bd8deadSopenharmony_ci 22925bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 22935bd8deadSopenharmony_ci it is the NONE operation. 22945bd8deadSopenharmony_ci 22955bd8deadSopenharmony_ci 3.8.13.1.9 Offset Texture 2D and Scale 22965bd8deadSopenharmony_ci 22975bd8deadSopenharmony_ci The OFFSET_TEXTURE_2D_SCALE_NV texture shader operation extends the 22985bd8deadSopenharmony_ci functionality of the OFFSET_TEXTURE_2D_NV texture shader operation. 22995bd8deadSopenharmony_ci The texture unit's 2D texture object is accessed by the same 23005bd8deadSopenharmony_ci perturbed s' and t' coordinates used by the OFFSET_TEXTURE_2D_NV 23015bd8deadSopenharmony_ci operation. The red, green, and blue components (but not alpha) 23025bd8deadSopenharmony_ci of the RGBA result of the texture access are further scaled by 23035bd8deadSopenharmony_ci the value Scale and clamped to the range [0,1]. This RGBA result 23045bd8deadSopenharmony_ci is this shader's texture unit RGBA result. This shader's texture 23055bd8deadSopenharmony_ci shader result is the RGBA result of the texture access prior to 23065bd8deadSopenharmony_ci scaling and clamping. 23075bd8deadSopenharmony_ci 23085bd8deadSopenharmony_ci Scale is computed with floating-point math as follows: 23095bd8deadSopenharmony_ci 23105bd8deadSopenharmony_ci Scale = max(0.0, min(1.0, textureOffsetBias + textureOffsetScale * MAGprev)) 23115bd8deadSopenharmony_ci 23125bd8deadSopenharmony_ci where textureOffsetBias is the texture shader stage's 23135bd8deadSopenharmony_ci OFFSET_TEXTURE_BIAS_NV value, textureOffsetScale is the texture 23145bd8deadSopenharmony_ci shader stage's OFFSET_TEXTURE_SCALE_NV value, and MAGprev 23155bd8deadSopenharmony_ci is the magnitude component of the a previous texture shader 23165bd8deadSopenharmony_ci unit's result specified by the current texture shader stage's 23175bd8deadSopenharmony_ci PREVIOUS_TEXTURE_INPUT_NV value. 23185bd8deadSopenharmony_ci 23195bd8deadSopenharmony_ci The texture unit RGBA result (red',green',blue',alpha') is computed 23205bd8deadSopenharmony_ci as follows: 23215bd8deadSopenharmony_ci 23225bd8deadSopenharmony_ci red' = Scale * red 23235bd8deadSopenharmony_ci green' = Scale * green 23245bd8deadSopenharmony_ci blue' = Scale * blue 23255bd8deadSopenharmony_ci alpha' = alpha 23265bd8deadSopenharmony_ci 23275bd8deadSopenharmony_ci where red, green, blue, and alpha are the texture access components. 23285bd8deadSopenharmony_ci 23295bd8deadSopenharmony_ci If the unit's 2D texture object has any signed components, then this 23305bd8deadSopenharmony_ci texture shader stage is not consistent. 23315bd8deadSopenharmony_ci 23325bd8deadSopenharmony_ci If the texture unit's 2D texture object is has a format type other 23335bd8deadSopenharmony_ci than RGBA (the DSDT_MAG_INTENSITY_NV base internal format does not 23345bd8deadSopenharmony_ci count as an RGBA format type in this context), then this texture 23355bd8deadSopenharmony_ci shader stage is not consistent. 23365bd8deadSopenharmony_ci 23375bd8deadSopenharmony_ci If the texture unit's 2D texture object is not consistent, then 23385bd8deadSopenharmony_ci this texture shader stage is not consistent. 23395bd8deadSopenharmony_ci 23405bd8deadSopenharmony_ci If the previous texture input texture object specified by the 23415bd8deadSopenharmony_ci current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 23425bd8deadSopenharmony_ci has a base internalformat that is not either DSDT_MAG_NV 23435bd8deadSopenharmony_ci or DSDT_MAG_INTENSITY_NV, then this texture shader stage is not 23445bd8deadSopenharmony_ci consistent. 23455bd8deadSopenharmony_ci 23465bd8deadSopenharmony_ci If the previous texture input texture shader operation specified by 23475bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 23485bd8deadSopenharmony_ci is DOT_PRODUCT_NV, then this texture shader stage is not consistent. 23495bd8deadSopenharmony_ci 23505bd8deadSopenharmony_ci If the previous texture input texture shader result specified by 23515bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 23525bd8deadSopenharmony_ci is invalid, then this texture shader stage is not consistent. 23535bd8deadSopenharmony_ci 23545bd8deadSopenharmony_ci If the previous texture input shader stage specified by the current 23555bd8deadSopenharmony_ci texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not 23565bd8deadSopenharmony_ci consistent, then this texture shader stage is not consistent. 23575bd8deadSopenharmony_ci 23585bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 23595bd8deadSopenharmony_ci it is the NONE operation. 23605bd8deadSopenharmony_ci 23615bd8deadSopenharmony_ci 3.8.13.1.10 Offset Texture Rectangle 23625bd8deadSopenharmony_ci 23635bd8deadSopenharmony_ci The OFFSET_TEXTURE_RECTANGLE_NV shader operation operates 23645bd8deadSopenharmony_ci identically to the OFFSET_TEXTURE_2D_NV shader operation except 23655bd8deadSopenharmony_ci that the rectangle texture target is accessed rather than the 2D 23665bd8deadSopenharmony_ci texture target. 23675bd8deadSopenharmony_ci 23685bd8deadSopenharmony_ci If the texture unit's rectangle texture object (rather than the 2D 23695bd8deadSopenharmony_ci texture object) is not consistent, then this texture shader stage 23705bd8deadSopenharmony_ci is not consistent. 23715bd8deadSopenharmony_ci 23725bd8deadSopenharmony_ci 3.8.13.1.11 Offset Texture Rectangle Scale 23735bd8deadSopenharmony_ci 23745bd8deadSopenharmony_ci The OFFSET_TEXTURE_RECTANGLE_SCALE_NV shader operation operates 23755bd8deadSopenharmony_ci identically to the OFFSET_TEXTURE_2D_SCALE_NV shader operation 23765bd8deadSopenharmony_ci except that the rectangle texture target is accessed rather than 23775bd8deadSopenharmony_ci the 2D texture target. 23785bd8deadSopenharmony_ci 23795bd8deadSopenharmony_ci If the texture unit's rectangle texture object (rather than the 2D 23805bd8deadSopenharmony_ci texture object) is not consistent, then this texture shader stage 23815bd8deadSopenharmony_ci is not consistent. 23825bd8deadSopenharmony_ci 23835bd8deadSopenharmony_ci 3.8.13.1.12 Dependent Alpha-Red Texturing 23845bd8deadSopenharmony_ci 23855bd8deadSopenharmony_ci The DEPENDENT_AR_TEXTURE_2D_NV texture shader operation accesses 23865bd8deadSopenharmony_ci the texture unit's 2D texture object (as described in section 3.8.4, 23875bd8deadSopenharmony_ci 3.8.5, and 3.8.6) using (Aprev, Rprev) for the 2D texture coordinates 23885bd8deadSopenharmony_ci where Aprev and Rprev are the are the alpha and red components of 23895bd8deadSopenharmony_ci a previous texture input's RGBA texture shader result specified by 23905bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value. 23915bd8deadSopenharmony_ci The result of the texture access becomes both the shader result and 23925bd8deadSopenharmony_ci texture unit RGBA result (see table 3.E). The type of the shader 23935bd8deadSopenharmony_ci result depends on the format type of the accessed texture. 23945bd8deadSopenharmony_ci 23955bd8deadSopenharmony_ci If the texture unit's 2D texture object is not consistent, then 23965bd8deadSopenharmony_ci this texture shader stage is not consistent. 23975bd8deadSopenharmony_ci 23985bd8deadSopenharmony_ci If the previous texture input's texture shader result specified 23995bd8deadSopenharmony_ci by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV 24005bd8deadSopenharmony_ci value has a texture shader result type other than RGBA (the 24015bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV base internal format does not count as an 24025bd8deadSopenharmony_ci RGBA format type in this context), then this texture shader stage 24035bd8deadSopenharmony_ci is not consistent. 24045bd8deadSopenharmony_ci 24055bd8deadSopenharmony_ci If the previous texture input's texture shader result specified 24065bd8deadSopenharmony_ci by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV 24075bd8deadSopenharmony_ci value has a texture shader result type of RGBA but any of the 24085bd8deadSopenharmony_ci RGBA components are signed, then this texture shader stage is not 24095bd8deadSopenharmony_ci consistent. 24105bd8deadSopenharmony_ci 24115bd8deadSopenharmony_ci If the previous texture input texture shader operation specified by 24125bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 24135bd8deadSopenharmony_ci is DOT_PRODUCT_NV, then this texture shader stage is not consistent. 24145bd8deadSopenharmony_ci 24155bd8deadSopenharmony_ci If the previous texture input texture shader result specified by 24165bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 24175bd8deadSopenharmony_ci is invalid, then this texture shader stage is not consistent. 24185bd8deadSopenharmony_ci 24195bd8deadSopenharmony_ci If the previous texture input shader stage specified by the current 24205bd8deadSopenharmony_ci texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not 24215bd8deadSopenharmony_ci consistent, then this texture shader stage is not consistent. 24225bd8deadSopenharmony_ci 24235bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 24245bd8deadSopenharmony_ci it is the NONE operation. 24255bd8deadSopenharmony_ci 24265bd8deadSopenharmony_ci 3.8.13.1.13 Dependent Green-Blue Texturing 24275bd8deadSopenharmony_ci 24285bd8deadSopenharmony_ci The DEPENDENT_GB_TEXTURE_2D_NV texture shader operation accesses 24295bd8deadSopenharmony_ci the texture unit's 2D texture object (as described in section 3.8.4, 24305bd8deadSopenharmony_ci 3.8.5, and 3.8.6) using (Gprev, Bprev) for the 2D texture coordinates 24315bd8deadSopenharmony_ci where Gprev and Bprev are the are the green and blue components 24325bd8deadSopenharmony_ci of a previous texture input's RGBA texture shader result specified by the 24335bd8deadSopenharmony_ci current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value. 24345bd8deadSopenharmony_ci The result of the texture access becomes both the shader result and 24355bd8deadSopenharmony_ci texture unit RGBA result (see table 3.E). The type of the shader 24365bd8deadSopenharmony_ci result depends on the format type of the accessed texture. 24375bd8deadSopenharmony_ci 24385bd8deadSopenharmony_ci If the texture unit's 2D texture object is not consistent, then 24395bd8deadSopenharmony_ci this texture shader stage is not consistent. 24405bd8deadSopenharmony_ci 24415bd8deadSopenharmony_ci If the previous texture input's texture shader result specified 24425bd8deadSopenharmony_ci by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV 24435bd8deadSopenharmony_ci value has a texture shader result type other than RGBA (the 24445bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV base internal format does not count as an 24455bd8deadSopenharmony_ci RGBA format type in this context), then this texture shader stage 24465bd8deadSopenharmony_ci is not consistent. 24475bd8deadSopenharmony_ci 24485bd8deadSopenharmony_ci If the previous texture input's texture shader result specified 24495bd8deadSopenharmony_ci by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV 24505bd8deadSopenharmony_ci value has a texture shader result type of RGBA but any of the 24515bd8deadSopenharmony_ci RGBA components are signed, then this texture shader stage is not 24525bd8deadSopenharmony_ci consistent. 24535bd8deadSopenharmony_ci 24545bd8deadSopenharmony_ci If the previous texture input texture shader operation specified by 24555bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 24565bd8deadSopenharmony_ci is DOT_PRODUCT_NV, then this texture shader stage is not consistent. 24575bd8deadSopenharmony_ci 24585bd8deadSopenharmony_ci If the previous texture input texture shader result specified by 24595bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 24605bd8deadSopenharmony_ci is invalid, then this texture shader stage is not consistent. 24615bd8deadSopenharmony_ci 24625bd8deadSopenharmony_ci If the previous texture input shader stage specified by the current 24635bd8deadSopenharmony_ci texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not 24645bd8deadSopenharmony_ci consistent, then this texture shader stage is not consistent. 24655bd8deadSopenharmony_ci 24665bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 24675bd8deadSopenharmony_ci it is the NONE operation. 24685bd8deadSopenharmony_ci 24695bd8deadSopenharmony_ci 3.8.13.1.14 Dot Product 24705bd8deadSopenharmony_ci 24715bd8deadSopenharmony_ci The DOT_PRODUCT_NV texture shader operation computes a 24725bd8deadSopenharmony_ci floating-point texture shader result. The texture shader result 24735bd8deadSopenharmony_ci is the floating-point dot product of the texture unit's (s,t,r) 24745bd8deadSopenharmony_ci texture coordinates and a remapped version of the RGBA or HILO 24755bd8deadSopenharmony_ci texture shader result from a specified previous texture shader stage. 24765bd8deadSopenharmony_ci The RGBA color result of this shader is always (0,0,0,0). 24775bd8deadSopenharmony_ci 24785bd8deadSopenharmony_ci The re-mapping depends on the specified previous texture shader 24795bd8deadSopenharmony_ci stage's texture shader result type. Specifically, the re-mapping 24805bd8deadSopenharmony_ci depends on whether this texture shader result type has all signed 24815bd8deadSopenharmony_ci components or all unsigned components, and whether it has RGBA 24825bd8deadSopenharmony_ci components or HILO components, and, in the case of unsigned RGBA 24835bd8deadSopenharmony_ci texture shader results, the RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 24845bd8deadSopenharmony_ci state. 24855bd8deadSopenharmony_ci 24865bd8deadSopenharmony_ci If the specified previous texture unit's texture shader result 24875bd8deadSopenharmony_ci type is HILO and all the type components are unsigned, then the 24885bd8deadSopenharmony_ci floating-point result is computed by 24895bd8deadSopenharmony_ci 24905bd8deadSopenharmony_ci result = s * HI + t * LO + r 24915bd8deadSopenharmony_ci 24925bd8deadSopenharmony_ci where HI and LO are the (unsigned) hi and lo components respectively 24935bd8deadSopenharmony_ci of the previous texture unit's HILO texture shader result. 24945bd8deadSopenharmony_ci 24955bd8deadSopenharmony_ci If the specified previous texture unit's texture shader result 24965bd8deadSopenharmony_ci type is HILO and all the type components are signed, then the 24975bd8deadSopenharmony_ci floating-point result is computed by 24985bd8deadSopenharmony_ci 24995bd8deadSopenharmony_ci result = s * HI + t * LO + r * sqrt(max(0, 1.0 - HI*HI - LO*LO)) 25005bd8deadSopenharmony_ci 25015bd8deadSopenharmony_ci where HI and LO are the (signed) hi and lo components respectively 25025bd8deadSopenharmony_ci of the previous texture unit's texture shader result. 25035bd8deadSopenharmony_ci 25045bd8deadSopenharmony_ci If the specified previous texture unit's texture shader result 25055bd8deadSopenharmony_ci contains only signed RGBA components, then the floating-point result 25065bd8deadSopenharmony_ci is computed by 25075bd8deadSopenharmony_ci 25085bd8deadSopenharmony_ci result = s * Rprev + t * Gprev + r * Bprev 25095bd8deadSopenharmony_ci 25105bd8deadSopenharmony_ci where Rprev, Gprev, and Bprev are the (signed) red, green, and blue 25115bd8deadSopenharmony_ci components respectively of the previous texture unit's RGBA texture 25125bd8deadSopenharmony_ci shader result. 25135bd8deadSopenharmony_ci 25145bd8deadSopenharmony_ci If the specified previous texture unit's texture shader result 25155bd8deadSopenharmony_ci contains only unsigned RGBA components, then the dot product 25165bd8deadSopenharmony_ci computation depends on the RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 25175bd8deadSopenharmony_ci state. When the RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV is 25185bd8deadSopenharmony_ci UNSIGNED_IDENTITY_NV, then the floating-point result for unsigned 25195bd8deadSopenharmony_ci RGBA components is computed by 25205bd8deadSopenharmony_ci 25215bd8deadSopenharmony_ci result = s * Rprev + t * Gprev + r * Bprev 25225bd8deadSopenharmony_ci 25235bd8deadSopenharmony_ci where Rprev, Gprev, and Bprev are the (unsigned) red, green, and 25245bd8deadSopenharmony_ci blue components respectively of the previous texture unit's RGBA 25255bd8deadSopenharmony_ci texture shader result. 25265bd8deadSopenharmony_ci 25275bd8deadSopenharmony_ci When the RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV is EXPAND_NORMAL_NV, 25285bd8deadSopenharmony_ci then the floating-point result for unsigned RGBA components is 25295bd8deadSopenharmony_ci computed by 25305bd8deadSopenharmony_ci 25315bd8deadSopenharmony_ci result = s * (2.0*Rprev-1.0) + t * (2.0*Gprev-1.0) + r * (2.0*Bprev-1.0) 25325bd8deadSopenharmony_ci 25335bd8deadSopenharmony_ci where Rprev, Gprev, and Bprev are the (unsigned) red, green, and 25345bd8deadSopenharmony_ci blue components respectively of the previous texture unit's RGBA 25355bd8deadSopenharmony_ci texture shader result. 25365bd8deadSopenharmony_ci 25375bd8deadSopenharmony_ci If the previous texture input texture object specified by the 25385bd8deadSopenharmony_ci current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has 25395bd8deadSopenharmony_ci a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV 25405bd8deadSopenharmony_ci base internal format does not count as an RGBA format type in this 25415bd8deadSopenharmony_ci context), then this texture shader stage is not consistent. 25425bd8deadSopenharmony_ci 25435bd8deadSopenharmony_ci If the components of the previous texture input texture 25445bd8deadSopenharmony_ci object specified by the current texture shader stage's 25455bd8deadSopenharmony_ci PREVIOUS_TEXTURE_INPUT_NV value have mixed signedness, then 25465bd8deadSopenharmony_ci this texture shader stage is not consistent. For example, 25475bd8deadSopenharmony_ci the SIGNED_RGB_UNSIGNED_ALPHA_NV base internal format has mixed 25485bd8deadSopenharmony_ci signedness. 25495bd8deadSopenharmony_ci 25505bd8deadSopenharmony_ci If the previous texture input texture shader operation specified by 25515bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 25525bd8deadSopenharmony_ci is DOT_PRODUCT_NV, then this texture shader stage is not consistent. 25535bd8deadSopenharmony_ci 25545bd8deadSopenharmony_ci If the previous texture input texture shader result specified by 25555bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 25565bd8deadSopenharmony_ci is invalid, then this texture shader stage is not consistent. 25575bd8deadSopenharmony_ci 25585bd8deadSopenharmony_ci If the previous texture input shader stage specified by the current 25595bd8deadSopenharmony_ci texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not 25605bd8deadSopenharmony_ci consistent, then this texture shader stage is not consistent. 25615bd8deadSopenharmony_ci 25625bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 25635bd8deadSopenharmony_ci it is the NONE operation. 25645bd8deadSopenharmony_ci 25655bd8deadSopenharmony_ci This operation in no way depends on any of the texture unit's 25665bd8deadSopenharmony_ci texture objects. 25675bd8deadSopenharmony_ci 25685bd8deadSopenharmony_ci 3.8.13.1.15 Dot Product Texture 2D 25695bd8deadSopenharmony_ci 25705bd8deadSopenharmony_ci The DOT_PRODUCT_TEXTURE_2D_NV texture shader operation accesses the 25715bd8deadSopenharmony_ci texture unit's 2D texture object (as described in sections 3.8.4, 25725bd8deadSopenharmony_ci 3.8.5, and 3.8.6) using (dotP,dotC) for the 2D texture coordinates. 25735bd8deadSopenharmony_ci The result of the texture access becomes both the shader result and 25745bd8deadSopenharmony_ci texture unit RGBA result (see table 3.E). The type of the shader 25755bd8deadSopenharmony_ci result depends on the format type of the accessed texture. 25765bd8deadSopenharmony_ci 25775bd8deadSopenharmony_ci Assuming that i is the current texture shader stage, dotP is the 25785bd8deadSopenharmony_ci floating-point dot product result from the i-1 texture shader stage, 25795bd8deadSopenharmony_ci assuming the i-1 texture shader stage's operation is DOT_PRODUCT_NV. 25805bd8deadSopenharmony_ci dotC is the floating-point dot product result from the current 25815bd8deadSopenharmony_ci texture shader stage. dotC is computed in the identical manner 25825bd8deadSopenharmony_ci used to compute the floating-point result of the DOT_PRODUCT_NV 25835bd8deadSopenharmony_ci texture shader described in section 3.8.13.1.14. 25845bd8deadSopenharmony_ci 25855bd8deadSopenharmony_ci If the previous texture input texture object specified by the 25865bd8deadSopenharmony_ci current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has 25875bd8deadSopenharmony_ci a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV 25885bd8deadSopenharmony_ci base internal format does not count as an RGBA format type in this 25895bd8deadSopenharmony_ci context), then this texture shader stage is not consistent. 25905bd8deadSopenharmony_ci 25915bd8deadSopenharmony_ci If the previous texture input texture shader operation specified by 25925bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 25935bd8deadSopenharmony_ci is DOT_PRODUCT_NV, then this texture shader stage is not consistent. 25945bd8deadSopenharmony_ci 25955bd8deadSopenharmony_ci If the previous texture input texture shader result specified by 25965bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 25975bd8deadSopenharmony_ci is invalid, then this texture shader stage is not consistent. 25985bd8deadSopenharmony_ci 25995bd8deadSopenharmony_ci If the previous texture input shader stage specified by the current 26005bd8deadSopenharmony_ci texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not 26015bd8deadSopenharmony_ci consistent, then this texture shader stage is not consistent. 26025bd8deadSopenharmony_ci 26035bd8deadSopenharmony_ci If the i-1 texture shader stage operation is not DOT_PRODUCT_NV, 26045bd8deadSopenharmony_ci then this texture shader stage is not consistent. 26055bd8deadSopenharmony_ci 26065bd8deadSopenharmony_ci If the i-1 texture shader stage is not consistent, then 26075bd8deadSopenharmony_ci this texture shader stage is not consistent. 26085bd8deadSopenharmony_ci 26095bd8deadSopenharmony_ci If the texture unit's 2D texture object is not consistent, then 26105bd8deadSopenharmony_ci this texture shader stage is not consistent. 26115bd8deadSopenharmony_ci 26125bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 26135bd8deadSopenharmony_ci it is the NONE operation. 26145bd8deadSopenharmony_ci 26155bd8deadSopenharmony_ci 3.8.13.1.16 Dot Product Texture Rectangle 26165bd8deadSopenharmony_ci 26175bd8deadSopenharmony_ci The DOT_PRODUCT_TEXTURE_RECTANGLE_NV shader operation operates 26185bd8deadSopenharmony_ci identically to the DOT_PRODUCT_TEXTURE_2D_NV shader operation except 26195bd8deadSopenharmony_ci that the rectangle texture target is accessed rather than the 2D 26205bd8deadSopenharmony_ci texture target. 26215bd8deadSopenharmony_ci 26225bd8deadSopenharmony_ci If the texture unit's rectangle texture object (rather than the 2D 26235bd8deadSopenharmony_ci texture object) is not consistent, then this texture shader stage 26245bd8deadSopenharmony_ci is not consistent. 26255bd8deadSopenharmony_ci 26265bd8deadSopenharmony_ci 3.8.13.1.17 Dot Product Texture Cube Map 26275bd8deadSopenharmony_ci 26285bd8deadSopenharmony_ci The DOT_PRODUCT_TEXTURE_CUBE_MAP_NV texture shader operation 26295bd8deadSopenharmony_ci accesses the texture unit's cube map texture object (as described 26305bd8deadSopenharmony_ci in the ARB_texture_cube_map specification) using (dotPP,dotP,dotC) 26315bd8deadSopenharmony_ci for the 3D texture coordinates. The result of the texture access 26325bd8deadSopenharmony_ci becomes both the shader result and texture unit RGBA result (see 26335bd8deadSopenharmony_ci table 3.E). The type of the shader result depends on the format 26345bd8deadSopenharmony_ci type of the accessed texture. 26355bd8deadSopenharmony_ci 26365bd8deadSopenharmony_ci Assuming that i is the current texture shader stage, dotPP is the 26375bd8deadSopenharmony_ci floating-point dot product texture shader result from the i-2 26385bd8deadSopenharmony_ci texture shader stage, assuming the i-2 texture shader stage's 26395bd8deadSopenharmony_ci operation is DOT_PRODUCT_NV. dotP is the floating-point dot 26405bd8deadSopenharmony_ci product texture shader result from the i-1 texture shader stage, 26415bd8deadSopenharmony_ci assuming the i-1 texture shader stage's operation is DOT_PRODUCT_NV. 26425bd8deadSopenharmony_ci dotC is the floating-point dot product result from the current 26435bd8deadSopenharmony_ci texture shader stage. dotC is computed in the identical manner 26445bd8deadSopenharmony_ci used to compute the floating-point result of the DOT_PRODUCT_NV 26455bd8deadSopenharmony_ci texture shader described in section 3.8.13.1.14. 26465bd8deadSopenharmony_ci 26475bd8deadSopenharmony_ci If the previous texture input texture object specified by the 26485bd8deadSopenharmony_ci current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has 26495bd8deadSopenharmony_ci a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV 26505bd8deadSopenharmony_ci base internal format does not count as an RGBA format type in this 26515bd8deadSopenharmony_ci context), then this texture shader stage is not consistent. 26525bd8deadSopenharmony_ci 26535bd8deadSopenharmony_ci If the previous texture input texture shader operation specified by 26545bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 26555bd8deadSopenharmony_ci is DOT_PRODUCT_NV, then this texture shader stage is not consistent. 26565bd8deadSopenharmony_ci 26575bd8deadSopenharmony_ci If the previous texture input texture shader result specified by 26585bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 26595bd8deadSopenharmony_ci is invalid, then this texture shader stage is not consistent. 26605bd8deadSopenharmony_ci 26615bd8deadSopenharmony_ci If the previous texture input shader stage specified by the current 26625bd8deadSopenharmony_ci texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not 26635bd8deadSopenharmony_ci consistent, then this texture shader stage is not consistent. 26645bd8deadSopenharmony_ci 26655bd8deadSopenharmony_ci If either the i-1 or i-2 texture shader stage operation is not 26665bd8deadSopenharmony_ci DOT_PRODUCT_NV, then this texture shader stage is not consistent. 26675bd8deadSopenharmony_ci 26685bd8deadSopenharmony_ci If either the i-1 or i-2 texture shader stage is not consistent, then 26695bd8deadSopenharmony_ci this texture shader stage is not consistent. 26705bd8deadSopenharmony_ci 26715bd8deadSopenharmony_ci If the texture unit's cube map texture object is not consistent, 26725bd8deadSopenharmony_ci then this texture shader stage is not consistent. 26735bd8deadSopenharmony_ci 26745bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 26755bd8deadSopenharmony_ci it is the NONE operation. 26765bd8deadSopenharmony_ci 26775bd8deadSopenharmony_ci 3.8.13.1.18 Dot Product Reflect Cube Map 26785bd8deadSopenharmony_ci 26795bd8deadSopenharmony_ci The DOT_PRODUCT_REFLECT_CUBE_MAP_NV and 26805bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV (described in the section 26815bd8deadSopenharmony_ci 3.8.13.1.20) texture shader operations are typically used together. 26825bd8deadSopenharmony_ci 26835bd8deadSopenharmony_ci The DOT_PRODUCT_REFLECT_CUBE_MAP_NV texture shader operation 26845bd8deadSopenharmony_ci accesses the texture unit's cube map texture object (as described 26855bd8deadSopenharmony_ci in the ARB_texture_cube_map specification) using (rx,ry,rz) for 26865bd8deadSopenharmony_ci the 3D texture coordinates. The result of the texture access becomes 26875bd8deadSopenharmony_ci both the shader result and texture unit RGBA result (see table 3.E). 26885bd8deadSopenharmony_ci The type of the shader result depends on the format type of the 26895bd8deadSopenharmony_ci accessed texture. 26905bd8deadSopenharmony_ci 26915bd8deadSopenharmony_ci Let R = (rx,ry,rz), N = (dotPP,dotP,dotC), and E = (qPP,qP,qC), 26925bd8deadSopenharmony_ci then 26935bd8deadSopenharmony_ci 26945bd8deadSopenharmony_ci R = 2 * (N dot E) / (N dot N) * N - E 26955bd8deadSopenharmony_ci 26965bd8deadSopenharmony_ci Assuming that i is the current texture shader stage, dotPP is 26975bd8deadSopenharmony_ci the floating-point dot product texture shader result from the 26985bd8deadSopenharmony_ci i-2 texture shader stage, assuming the i-2 texture shader stage's 26995bd8deadSopenharmony_ci operation is DOT_PRODUCT_NV. dotP is the floating-point dot product 27005bd8deadSopenharmony_ci texture shader result from the i-1 texture shader stage, assuming 27015bd8deadSopenharmony_ci the i-1 texture shader stage's operation is either DOT_PRODUCT_NV 27025bd8deadSopenharmony_ci or DOT_PRODUCT_DIFFUSE_NV. dotC is the floating-point dot product 27035bd8deadSopenharmony_ci result from the current texture shader stage. dotC is computed in 27045bd8deadSopenharmony_ci the identical manner used to compute the floating-point result of 27055bd8deadSopenharmony_ci the DOT_PRODUCT_NV texture shader described in section 3.8.13.1.14. 27065bd8deadSopenharmony_ci 27075bd8deadSopenharmony_ci qPP is the q component of the i-2 texture shader stage's texture 27085bd8deadSopenharmony_ci coordinate set. qP is the q component of the i-1 texture shader 27095bd8deadSopenharmony_ci stage's texture coordinate set. qC is the q component of the 27105bd8deadSopenharmony_ci current texture shader stage's texture coordinate set. 27115bd8deadSopenharmony_ci 27125bd8deadSopenharmony_ci If the previous texture input texture object specified by the 27135bd8deadSopenharmony_ci current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has 27145bd8deadSopenharmony_ci a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV 27155bd8deadSopenharmony_ci base internal format does not count as an RGBA format type in this 27165bd8deadSopenharmony_ci context), then this texture shader stage is not consistent. 27175bd8deadSopenharmony_ci 27185bd8deadSopenharmony_ci If the previous texture input texture shader operation specified by 27195bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 27205bd8deadSopenharmony_ci is DOT_PRODUCT_NV, then this texture shader stage is not consistent. 27215bd8deadSopenharmony_ci 27225bd8deadSopenharmony_ci If the previous texture input texture shader result specified by 27235bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 27245bd8deadSopenharmony_ci is invalid, then this texture shader stage is not consistent. 27255bd8deadSopenharmony_ci 27265bd8deadSopenharmony_ci If this texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 27275bd8deadSopenharmony_ci refers to texture unit i-2 or i-1, then this texture shader stage 27285bd8deadSopenharmony_ci is not consistent. 27295bd8deadSopenharmony_ci 27305bd8deadSopenharmony_ci If the previous texture input shader stage specified by the current 27315bd8deadSopenharmony_ci texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not 27325bd8deadSopenharmony_ci consistent, then this texture shader stage is not consistent. 27335bd8deadSopenharmony_ci 27345bd8deadSopenharmony_ci If the i-2 texture shader stage operation is not 27355bd8deadSopenharmony_ci DOT_PRODUCT_NV, then this texture shader stage is not consistent. 27365bd8deadSopenharmony_ci 27375bd8deadSopenharmony_ci If the i-1 texture shader stage operation is not DOT_PRODUCT_NV or 27385bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, then this texture shader stage is 27395bd8deadSopenharmony_ci not consistent. 27405bd8deadSopenharmony_ci 27415bd8deadSopenharmony_ci If either the i-1 or i-2 texture shader stage is not consistent, then 27425bd8deadSopenharmony_ci this texture shader stage is not consistent. 27435bd8deadSopenharmony_ci 27445bd8deadSopenharmony_ci If the texture unit's cube map texture object is not consistent, 27455bd8deadSopenharmony_ci then this texture shader stage is not consistent. 27465bd8deadSopenharmony_ci 27475bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 27485bd8deadSopenharmony_ci it is the NONE operation. 27495bd8deadSopenharmony_ci 27505bd8deadSopenharmony_ci 3.8.13.1.19 Dot Product Constant Eye Reflect Cube Map 27515bd8deadSopenharmony_ci 27525bd8deadSopenharmony_ci The DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV texture shader 27535bd8deadSopenharmony_ci operation operates the same as the DOT_PRODUCT_REFLECT_CUBE_MAP_NV 27545bd8deadSopenharmony_ci operation except that the eye vector E is equal to the three 27555bd8deadSopenharmony_ci floating-point values assigned to the texture shader's eye 27565bd8deadSopenharmony_ci constant (rather than the three q components of the given texture 27575bd8deadSopenharmony_ci unit and the previous two texture units). 27585bd8deadSopenharmony_ci 27595bd8deadSopenharmony_ci The DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV operation 27605bd8deadSopenharmony_ci has the same texture shader consistency rules as the 27615bd8deadSopenharmony_ci DOT_PRODUCT_REFLECT_CUBE_MAP_NV operation. 27625bd8deadSopenharmony_ci 27635bd8deadSopenharmony_ci 3.8.13.1.20 Dot Product Diffuse Cube Map 27645bd8deadSopenharmony_ci 27655bd8deadSopenharmony_ci The DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV texture shader operation 27665bd8deadSopenharmony_ci accesses the texture unit's cube map texture object (as described 27675bd8deadSopenharmony_ci in the ARB_texture_cube_map specification) using (dotP,dotC,dotN) 27685bd8deadSopenharmony_ci for the 3D texture coordinates. The result of the texture access 27695bd8deadSopenharmony_ci becomes both the shader result and texture unit RGBA result (see 27705bd8deadSopenharmony_ci table 3.E). The type of the shader result depends on the format 27715bd8deadSopenharmony_ci type of the accessed texture. 27725bd8deadSopenharmony_ci 27735bd8deadSopenharmony_ci Assuming that i is the current texture shader stage, dotP is the 27745bd8deadSopenharmony_ci floating-point dot product texture shader result from the i-1 texture 27755bd8deadSopenharmony_ci shader stage, assuming the i-1 texture shader stage's operation 27765bd8deadSopenharmony_ci is DOT_PRODUCT_NV. dotC is the floating-point dot product result 27775bd8deadSopenharmony_ci from the current texture shader stage. dotC is computed in the 27785bd8deadSopenharmony_ci identical manner used to compute the floating-point result of the 27795bd8deadSopenharmony_ci DOT_PRODUCT_NV texture shader described in section 3.8.13.1.14. 27805bd8deadSopenharmony_ci dotN is the floating-point dot product texture shader result from 27815bd8deadSopenharmony_ci the i+1 texture shader stage, assuming the next texture shader 27825bd8deadSopenharmony_ci stage's operation is either DOT_PRODUCT_REFLECT_CUBE_MAP_NV or 27835bd8deadSopenharmony_ci DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. 27845bd8deadSopenharmony_ci 27855bd8deadSopenharmony_ci If the texture unit's cube map texture object is not consistent, 27865bd8deadSopenharmony_ci then this operation operates as if it is the NONE operation. 27875bd8deadSopenharmony_ci If the previous texture unit's texture shader operation is 27885bd8deadSopenharmony_ci not DOT_PRODUCT_NV, then this operation operates as if it 27895bd8deadSopenharmony_ci is the NONE operation. If the next texture unit's texture 27905bd8deadSopenharmony_ci shader operation is neither DOT_PRODUCT_REFLECT_CUBE_MAP_NV nor 27915bd8deadSopenharmony_ci DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV, then this operation 27925bd8deadSopenharmony_ci operates as if it is the NONE operation. If the next texture unit's 27935bd8deadSopenharmony_ci texture shader operation is either DOT_PRODUCT_REFLECT_CUBE_MAP_NV 27945bd8deadSopenharmony_ci or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV, but the next texture 27955bd8deadSopenharmony_ci unit operation is operating as if it is the NONE operation, then 27965bd8deadSopenharmony_ci this operation operates as if it is the NONE operation. If the 27975bd8deadSopenharmony_ci specified previous input texture unit is inconsistent or uses 27985bd8deadSopenharmony_ci the DOT_PRODUCT_NV texture shader operation, then this operation 27995bd8deadSopenharmony_ci operates as if it is the NONE operation. 28005bd8deadSopenharmony_ci 28015bd8deadSopenharmony_ci If the previous texture input texture object specified by the 28025bd8deadSopenharmony_ci current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has 28035bd8deadSopenharmony_ci a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV 28045bd8deadSopenharmony_ci base internal format does not count as an RGBA format type in this 28055bd8deadSopenharmony_ci context), then this texture shader stage is not consistent. 28065bd8deadSopenharmony_ci 28075bd8deadSopenharmony_ci If the previous texture input texture shader operation specified by 28085bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 28095bd8deadSopenharmony_ci is DOT_PRODUCT_NV, then this texture shader stage is not consistent. 28105bd8deadSopenharmony_ci 28115bd8deadSopenharmony_ci If the previous texture input texture shader result specified by 28125bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 28135bd8deadSopenharmony_ci is invalid, then this texture shader stage is not consistent. 28145bd8deadSopenharmony_ci 28155bd8deadSopenharmony_ci If the previous texture input shader stage specified by the current 28165bd8deadSopenharmony_ci texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not 28175bd8deadSopenharmony_ci consistent, then this texture shader stage is not consistent. 28185bd8deadSopenharmony_ci 28195bd8deadSopenharmony_ci If the i-1 texture shader stage operation is not 28205bd8deadSopenharmony_ci DOT_PRODUCT_NV, then this texture shader stage is not consistent. 28215bd8deadSopenharmony_ci 28225bd8deadSopenharmony_ci If the i+1 texture shader stage operation 28235bd8deadSopenharmony_ci is not DOT_PRODUCT_REFLECT_CUBE_MAP_NV or 28245bd8deadSopenharmony_ci DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV, then this texture shader 28255bd8deadSopenharmony_ci stage is not consistent. 28265bd8deadSopenharmony_ci 28275bd8deadSopenharmony_ci If either the i-1 or i+1 texture shader stage is not consistent, 28285bd8deadSopenharmony_ci then this texture shader stage is not consistent. 28295bd8deadSopenharmony_ci 28305bd8deadSopenharmony_ci If the texture unit's cube map texture object is not consistent, 28315bd8deadSopenharmony_ci then this texture shader stage is not consistent. 28325bd8deadSopenharmony_ci 28335bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 28345bd8deadSopenharmony_ci it is the NONE operation. 28355bd8deadSopenharmony_ci 28365bd8deadSopenharmony_ci 3.8.13.1.21 Dot Product Depth Replace 28375bd8deadSopenharmony_ci 28385bd8deadSopenharmony_ci The DOT_PRODUCT_DEPTH_REPLACE_NV texture shader operation replaces 28395bd8deadSopenharmony_ci the incoming fragments depth (in window coordinates, after polygon 28405bd8deadSopenharmony_ci offset and before conversion to fixed-point, i.e. in the [0,1] 28415bd8deadSopenharmony_ci range) with a new depth value. The new depth is computed as follows: 28425bd8deadSopenharmony_ci 28435bd8deadSopenharmony_ci depth = dotP / dotC 28445bd8deadSopenharmony_ci 28455bd8deadSopenharmony_ci Assuming that i is the current texture shader stage, dotP is the 28465bd8deadSopenharmony_ci floating-point dot product texture shader result from the i-1 texture 28475bd8deadSopenharmony_ci shader stage, assuming the i-1 texture shader stage's operation 28485bd8deadSopenharmony_ci is DOT_PRODUCT_NV. dotC is the floating-point dot product result 28495bd8deadSopenharmony_ci from the current texture shader stage. dotC is computed in the 28505bd8deadSopenharmony_ci identical manner used to compute the floating-point result of the 28515bd8deadSopenharmony_ci DOT_PRODUCT_NV texture shader described in section 3.8.13.1.14. 28525bd8deadSopenharmony_ci 28535bd8deadSopenharmony_ci If the new depth value is outside of the range of the near and far 28545bd8deadSopenharmony_ci depth range values, the fragment is rejected. 28555bd8deadSopenharmony_ci 28565bd8deadSopenharmony_ci The texture unit RGBA result generated is always (0,0,0,0). 28575bd8deadSopenharmony_ci The texture shader result is invalid. 28585bd8deadSopenharmony_ci 28595bd8deadSopenharmony_ci If the previous texture input texture object specified by the 28605bd8deadSopenharmony_ci current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has 28615bd8deadSopenharmony_ci a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV 28625bd8deadSopenharmony_ci base internal format does not count as an RGBA format type in this 28635bd8deadSopenharmony_ci context), then this texture shader stage is not consistent. 28645bd8deadSopenharmony_ci 28655bd8deadSopenharmony_ci If the previous texture input texture shader operation specified by 28665bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 28675bd8deadSopenharmony_ci is DOT_PRODUCT_NV, then this texture shader stage is not consistent. 28685bd8deadSopenharmony_ci 28695bd8deadSopenharmony_ci If the previous texture input texture shader result specified by 28705bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 28715bd8deadSopenharmony_ci is invalid, then this texture shader stage is not consistent. 28725bd8deadSopenharmony_ci 28735bd8deadSopenharmony_ci If the previous texture input shader stage specified by the current 28745bd8deadSopenharmony_ci texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not 28755bd8deadSopenharmony_ci consistent, then this texture shader stage is not consistent. 28765bd8deadSopenharmony_ci 28775bd8deadSopenharmony_ci If the i-1 texture shader stage operation is not DOT_PRODUCT_NV, 28785bd8deadSopenharmony_ci then this texture shader stage is not consistent. 28795bd8deadSopenharmony_ci 28805bd8deadSopenharmony_ci If the i-1 texture shader stage is not consistent, then 28815bd8deadSopenharmony_ci this texture shader stage is not consistent. 28825bd8deadSopenharmony_ci 28835bd8deadSopenharmony_ci If any previous texture shader stage operation is 28845bd8deadSopenharmony_ci DOT_PRODUCT_DEPTH_REPLACE_NV and that previous stage is consistent, 28855bd8deadSopenharmony_ci then this texture shader stage is not consistent. (This eliminates 28865bd8deadSopenharmony_ci the potential for two stages to each be performing a depth replace 28875bd8deadSopenharmony_ci operation.) 28885bd8deadSopenharmony_ci 28895bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 28905bd8deadSopenharmony_ci it is the NONE operation. 28915bd8deadSopenharmony_ci 28925bd8deadSopenharmony_ci This operation in no way depends on any of the texture unit's 28935bd8deadSopenharmony_ci texture objects. 28945bd8deadSopenharmony_ci 28955bd8deadSopenharmony_ci 3.8.13.2 Texture Shader Restrictions 28965bd8deadSopenharmony_ci 28975bd8deadSopenharmony_ci There are various restrictions on possible texture shader 28985bd8deadSopenharmony_ci configurations. These restrictions are described in this section. 28995bd8deadSopenharmony_ci 29005bd8deadSopenharmony_ci The error INVALID_OPERATION occurs if the SHADER_OPERATION_NV 29015bd8deadSopenharmony_ci parameter for texture unit 0 is assigned one of OFFSET_TEXTURE_2D_NV, 29025bd8deadSopenharmony_ci OFFSET_TEXTURE_2D_SCALE_NV, OFFSET_TEXTURE_RECTANGLE_NV, 29035bd8deadSopenharmony_ci OFFSET_TEXTURE_RECTANGLE_SCALE_NV, DEPENDENT_AR_TEXTURE_2D_NV, 29045bd8deadSopenharmony_ci DEPENDENT_GB_TEXTURE_2D_NV, DOT_PRODUCT_NV, 29055bd8deadSopenharmony_ci DOT_PRODUCT_DEPTH_REPLACE_NV, DOT_PRODUCT_TEXTURE_2D_NV, 29065bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_RECTANGLE_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, 29075bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, 29085bd8deadSopenharmony_ci or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. Each of these 29095bd8deadSopenharmony_ci texture shaders requires a previous texture shader result that 29105bd8deadSopenharmony_ci is not possible for texture unit 0. Therefore these shaders are 29115bd8deadSopenharmony_ci disallowed for texture unit 0. 29125bd8deadSopenharmony_ci 29135bd8deadSopenharmony_ci The error INVALID_OPERATION occurs if the SHADER_OPERATION_NV 29145bd8deadSopenharmony_ci parameter for texture unit 1 is assigned one of 29155bd8deadSopenharmony_ci DOT_PRODUCT_DEPTH_REPLACE_NV, DOT_PRODUCT_TEXTURE_2D_NV, 29165bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_RECTANGLE_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, 29175bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, 29185bd8deadSopenharmony_ci or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. Each of these texture 29195bd8deadSopenharmony_ci shaders requires either two previous texture shader results or 29205bd8deadSopenharmony_ci a dot product result that cannot be generated by texture unit 0. 29215bd8deadSopenharmony_ci Therefore these shaders are disallowed for texture unit 1. 29225bd8deadSopenharmony_ci 29235bd8deadSopenharmony_ci The error INVALID_OPERATION occurs if the SHADER_OPERATION_NV 29245bd8deadSopenharmony_ci parameter for texture unit 2 is assigned one of 29255bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, 29265bd8deadSopenharmony_ci DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. Each of these texture 29275bd8deadSopenharmony_ci shaders requires three previous texture shader results. Therefore 29285bd8deadSopenharmony_ci these shaders are disallowed for texture unit 2. 29295bd8deadSopenharmony_ci 29305bd8deadSopenharmony_ci The error INVALID_OPERATION occurs if the SHADER_OPERATION_NV 29315bd8deadSopenharmony_ci parameter for texture unit n-1 (where n is the number of 29325bd8deadSopenharmony_ci supported texture units) is assigned either DOT_PRODUCT_NV or 29335bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV. DOT_PRODUCT_NV is invalid for the 29345bd8deadSopenharmony_ci final texture shader stage because it is only useful as an input to 29355bd8deadSopenharmony_ci a successive texture shader stage. DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 29365bd8deadSopenharmony_ci is invalid for the final texture shader stage because it must be 29375bd8deadSopenharmony_ci followed by the DOT_PRODUCT_REFLECT_CUBE_MAP_NV operation in the 29385bd8deadSopenharmony_ci immediately successive stage. Therefore these shaders are disallowed 29395bd8deadSopenharmony_ci for texture unit n-1. 29405bd8deadSopenharmony_ci 29415bd8deadSopenharmony_ci 3.8.13.3 Required State 29425bd8deadSopenharmony_ci 29435bd8deadSopenharmony_ci The state required for texture shaders consists of a single bit to 29445bd8deadSopenharmony_ci indicate whether or not texture shaders are enabled, a vector of 29455bd8deadSopenharmony_ci three floating-point values for the constant eye vector, and n sets 29465bd8deadSopenharmony_ci of per-texture unit state where n is the implementation-dependent 29475bd8deadSopenharmony_ci number of supported texture units. The set of per-texture unit 29485bd8deadSopenharmony_ci texture shader state consists of the twenty-one-valued integer 29495bd8deadSopenharmony_ci indicating the texture shader operation, four two-valued integers 29505bd8deadSopenharmony_ci indicating the cull modes, an integer indicating the previous texture 29515bd8deadSopenharmony_ci unit input, a two-valued integer indicating the RGBA unsigned dot 29525bd8deadSopenharmony_ci product mapping mode, a 2x2 floating-point matrix indicating the 29535bd8deadSopenharmony_ci texture offset transform, a floating-point value indicating the 29545bd8deadSopenharmony_ci texture offset scale, a floating-point value indicating the texture 29555bd8deadSopenharmony_ci offset bias, and a bit to indicate whether or not the texture shader 29565bd8deadSopenharmony_ci stage is consistent. 29575bd8deadSopenharmony_ci 29585bd8deadSopenharmony_ci In the initial state, the texture shaders state is set as follows: 29595bd8deadSopenharmony_ci the texture shaders enable is disabled; the constant eye vector 29605bd8deadSopenharmony_ci is (0,0,-1); all the texture shader operations are NONE; the RGBA 29615bd8deadSopenharmony_ci unsigned dot product mapping mode is UNSIGNED_IDENTITY_NV; all the 29625bd8deadSopenharmony_ci cull mode values are GEQUAL; all the previous texture units are 29635bd8deadSopenharmony_ci TEXTURE0_ARB; each texture offset matrix is an identity matrix; 29645bd8deadSopenharmony_ci all texture offset scales are 1.0; and all texture offset biases 29655bd8deadSopenharmony_ci are 0.0." 29665bd8deadSopenharmony_ci 29675bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations 29685bd8deadSopenharmony_ciand the Frame Buffer) 29695bd8deadSopenharmony_ci 29705bd8deadSopenharmony_ci None 29715bd8deadSopenharmony_ci 29725bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 Specification (Special Functions) 29735bd8deadSopenharmony_ci 29745bd8deadSopenharmony_ci None 29755bd8deadSopenharmony_ci 29765bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 Specification (State and State Requests) 29775bd8deadSopenharmony_ci 29785bd8deadSopenharmony_ci -- Section 6.1.3 "Texture Environments and Texture Functions" 29795bd8deadSopenharmony_ci 29805bd8deadSopenharmony_ci Change the third sentence of the third paragraph to read: 29815bd8deadSopenharmony_ci 29825bd8deadSopenharmony_ci "The env argument to GetTexEnv must be one of TEXTURE_ENV, 29835bd8deadSopenharmony_ci TEXTURE_FILTER_CONTROL_EXT, or TEXTURE_SHADER_NV." 29845bd8deadSopenharmony_ci 29855bd8deadSopenharmony_ci Add to the end of the third paragraph: 29865bd8deadSopenharmony_ci 29875bd8deadSopenharmony_ci "For GetTexEnv, when the target is TEXTURE_SHADER_NV, the texture 29885bd8deadSopenharmony_ci shader stage consistency can be queried with SHADER_CONSISTENT_NV." 29895bd8deadSopenharmony_ci 29905bd8deadSopenharmony_ci Change the following sentence in the fouth paragraph to include 29915bd8deadSopenharmony_ci sizes for the newly introduced component: 29925bd8deadSopenharmony_ci 29935bd8deadSopenharmony_ci "Queries of TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE, TEXTURE_BLUE_SIZE, 29945bd8deadSopenharmony_ci TEXTURE_ALPHA_SIZE, TEXTURE_LUMINANCE_SIZE, TEXTURE_DS_SIZE_EXT, 29955bd8deadSopenharmony_ci TEXTURE_DT_SIZE_EXT, TEXTURE_HI_SIZE_EXT, TEXTURE_LO_SIZE_EXT, 29965bd8deadSopenharmony_ci TEXTURE_MAG_SIZE_EXT, and TEXTURE_INTENSITY_SIZE return the actual 29975bd8deadSopenharmony_ci resolutions of the stored image array components, not the resolutions 29985bd8deadSopenharmony_ci specified when the image array was defined." 29995bd8deadSopenharmony_ci 30005bd8deadSopenharmony_ci Add the following to the end of the fourth paragraph: 30015bd8deadSopenharmony_ci 30025bd8deadSopenharmony_ci "Queries of TEXTURE_BORDER_COLOR return the same values as the 30035bd8deadSopenharmony_ci TEXTURE_BORDER_VALUES query." 30045bd8deadSopenharmony_ci 30055bd8deadSopenharmony_ci -- Section 6.1.4 "Texture Queries" 30065bd8deadSopenharmony_ci 30075bd8deadSopenharmony_ci Add the following to the end of the fourth paragraph: 30085bd8deadSopenharmony_ci 30095bd8deadSopenharmony_ci "Calling GetTexImage with a color format (one of RED, GREEN, 30105bd8deadSopenharmony_ci BLUE, ALPHA, RGB, RGBA, BGR, BGRA, LUMINANCE, or LUMINANCE_ALPHA) 30115bd8deadSopenharmony_ci when the texture image is of a format type (see table 3.15) 30125bd8deadSopenharmony_ci other than RGBA (the DSDT_MAG_INTENSITY_NV base internal format 30135bd8deadSopenharmony_ci does not count as an RGBA format type in this context) causes the 30145bd8deadSopenharmony_ci error INVALID_OPERATION. Calling GetTexImage with a format of 30155bd8deadSopenharmony_ci HILO_NV when the texture image is of a format type (see table 30165bd8deadSopenharmony_ci 3.15) other than HILO_NV causes the error INVALID_OPERATION. 30175bd8deadSopenharmony_ci Calling GetTexImage with a format of DSDT_NV when the texture image 30185bd8deadSopenharmony_ci is of a base internal format other than DSDT_NV causes the error 30195bd8deadSopenharmony_ci INVALID_OPERATION. Calling GetTexImage with a format of DSDT_MAG_NV 30205bd8deadSopenharmony_ci when the texture image is of a base internal format other than 30215bd8deadSopenharmony_ci DSDT_MAG_NV causes the error INVALID_OPERATION. Calling GetTexImage 30225bd8deadSopenharmony_ci with a format of DSDT_MAG_VIB_NV when the texture image is of a 30235bd8deadSopenharmony_ci base internal format other than DSDT_MAG_INTENSITY_NV causes the 30245bd8deadSopenharmony_ci error INVALID_OPERATION." 30255bd8deadSopenharmony_ci 30265bd8deadSopenharmony_ciAdditions to the GLX Specification 30275bd8deadSopenharmony_ci 30285bd8deadSopenharmony_ci None 30295bd8deadSopenharmony_ci 30305bd8deadSopenharmony_ciDependencies on ARB_texture_env_add or EXT_texture_env_add 30315bd8deadSopenharmony_ci 30325bd8deadSopenharmony_ci If neither ARB_texture_env_add nor EXT_texture_env_add are 30335bd8deadSopenharmony_ci implemented, then the references to ADD are invalid and should be 30345bd8deadSopenharmony_ci ignored. 30355bd8deadSopenharmony_ci 30365bd8deadSopenharmony_ciDependencies on ARB_texture_env_combine or EXT_texture_env_combine 30375bd8deadSopenharmony_ci 30385bd8deadSopenharmony_ci If neither ARB_texture_env_combine nor EXT_texture_env_combine are 30395bd8deadSopenharmony_ci implemented, then the references to COMBINE_ARB and COMBINE_EXT 30405bd8deadSopenharmony_ci are invalid and should be ignored. 30415bd8deadSopenharmony_ci 30425bd8deadSopenharmony_ciDependencies on EXT_texture_lod_bias 30435bd8deadSopenharmony_ci 30445bd8deadSopenharmony_ci If EXT_texture_lod_bias is not implemented, then the references to 30455bd8deadSopenharmony_ci TEXTURE_FILTER_CONTROL_EXT are invalid and should be ignored. 30465bd8deadSopenharmony_ci 30475bd8deadSopenharmony_ciDependencies on NV_texture_env_combine4 30485bd8deadSopenharmony_ci 30495bd8deadSopenharmony_ci If NV_texture_env_combine4 is not implemented, then the references 30505bd8deadSopenharmony_ci to COMBINE4_NV are invalid and should be ignored. 30515bd8deadSopenharmony_ci 30525bd8deadSopenharmony_ciDependencies on NV_texture_rectangle 30535bd8deadSopenharmony_ci 30545bd8deadSopenharmony_ci If NV_texture_rectangle is not implemented, then the references 30555bd8deadSopenharmony_ci to TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_NV, 30565bd8deadSopenharmony_ci OFFSET_TEXTURE_RECTANGLE_SCALE_NV, and 30575bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_RECTANGLE_NV are invalid and should be ignored. 30585bd8deadSopenharmony_ci 30595bd8deadSopenharmony_ciDependencies on ARB_color_buffer_float 30605bd8deadSopenharmony_ci 30615bd8deadSopenharmony_ci If ARB_color_buffer_float is also implemented, then the "max(0,x)", 30625bd8deadSopenharmony_ci "max(-1,x)" and "min(1,x)" functions for clamping in tables 3.18 30635bd8deadSopenharmony_ci and 3.19 simply return "x" without applying the maximum or minimum 30645bd8deadSopenharmony_ci function when CLAMP_FRAGMENT_COLOR_ARB is either FIXED_ONLY_ARB 30655bd8deadSopenharmony_ci when rendering to a floating-point color framebuffer or FALSE. 30665bd8deadSopenharmony_ci 30675bd8deadSopenharmony_ci However clamping operations for texture shader operations 30685bd8deadSopenharmony_ci (specifically PASS_THROUGH_NV and OFFSET_TEXTURE_2D_SCALE_NV) 30695bd8deadSopenharmony_ci are performed independent of the CLAMP_FRAGMENT_COLOR_ARB state. 30705bd8deadSopenharmony_ci 30715bd8deadSopenharmony_ci The intent of these interactions is to eliminate the specified 30725bd8deadSopenharmony_ci clamping behavior of texture environment functions when 30735bd8deadSopenharmony_ci CLAMP_FRAGMENT_COLOR_ARB indicates clamping should not be performed. 30745bd8deadSopenharmony_ci 30755bd8deadSopenharmony_ciErrors 30765bd8deadSopenharmony_ci 30775bd8deadSopenharmony_ci INVALID_ENUM is generated if one of HILO_NV, DSDT_NV, DSDT_MAG_NV, 30785bd8deadSopenharmony_ci or DSDT_MAG_VIBRANCE_NV is used as the format for DrawPixels, 30795bd8deadSopenharmony_ci ReadPixels, ColorTable, ColorSubTable, ConvolutionFilter1D, 30805bd8deadSopenharmony_ci ConvolutionFilter2D, SeparableFilter2D, GetColorTable, 30815bd8deadSopenharmony_ci GetConvolutionFilter, GetSeparableFilter, GetHistogram, or 30825bd8deadSopenharmony_ci GetMinmax. 30835bd8deadSopenharmony_ci 30845bd8deadSopenharmony_ci INVALID_ENUM is generated if either UNSIGNED_INT_S8_S8_8_8_NV or 30855bd8deadSopenharmony_ci UNSIGNED_INT_8_8_S8_S8_REV is used as the type for DrawPixels, 30865bd8deadSopenharmony_ci ReadPixels, ColorTable, ColorSubTable, ConvolutionFilter1D, 30875bd8deadSopenharmony_ci ConvolutionFilter2D, SeparableFilter2D, GetColorTable, 30885bd8deadSopenharmony_ci GetConvolutionFilter, GetSeparableFilter, GetHistogram, or 30895bd8deadSopenharmony_ci GetMinmax. 30905bd8deadSopenharmony_ci 30915bd8deadSopenharmony_ci INVALID_OPERATION is generated if a packed pixel format type listed 30925bd8deadSopenharmony_ci in table 3.8 is used with DrawPixels, ReadPixels, ColorTable, 30935bd8deadSopenharmony_ci ColorSubTable, ConvolutionFilter1D, ConvolutionFilter2D, 30945bd8deadSopenharmony_ci SeparableFilter2D, GetColorTable, GetConvolutionFilter, 30955bd8deadSopenharmony_ci GetSeparableFilter, GetHistogram, GetMinmax, TexImage1D, TexImage2D, 30965bd8deadSopenharmony_ci TexSubImage1D, TexSubImage2D, TexSubImage3d, or 30975bd8deadSopenharmony_ci GetTexImage but the format parameter does not match on of the allowed 30985bd8deadSopenharmony_ci Matching Pixel Formats listed in table 3.8 for the specified packed 30995bd8deadSopenharmony_ci type parameter. 31005bd8deadSopenharmony_ci 31015bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexImage1D or TexImage2D are 31025bd8deadSopenharmony_ci called and the format is HILO_NV and the internalformat is not 31035bd8deadSopenharmony_ci one of HILO_NV, HILO16_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV; or if 31045bd8deadSopenharmony_ci the internalformat is one of HILO_NV, HILO16_NV, SIGNED_HILO_NV, 31055bd8deadSopenharmony_ci or SIGNED_HILO16_NV and the format is not HILO_NV. 31065bd8deadSopenharmony_ci 31075bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexImage2D, or TexImage1D is 31085bd8deadSopenharmony_ci called and if the format is DSDT_NV and the internalformat is not 31095bd8deadSopenharmony_ci either DSDT_NV or DSDT8_NV; or if the internal format is either 31105bd8deadSopenharmony_ci DSDT_NV or DSDT8_NV and the format is not DSDT_NV. 31115bd8deadSopenharmony_ci 31125bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexImage2D, or TexImage1D is 31135bd8deadSopenharmony_ci called and if the format is DSDT_MAG_NV and the internalformat 31145bd8deadSopenharmony_ci is not either DSDT_MAG_NV or DSDT8_MAG8_NV; or if the internal 31155bd8deadSopenharmony_ci format is either DSDT_MAG_NV or DSDT8_MAG8_NV and the format is 31165bd8deadSopenharmony_ci not DSDT_MAG_NV. 31175bd8deadSopenharmony_ci 31185bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexImage2D or TexImage1D is 31195bd8deadSopenharmony_ci called and if the format is DSDT_MAG_VIB_NV and the internalformat 31205bd8deadSopenharmony_ci is not either DSDT_MAG_INTENSITY_NV or DSDT8_MAG8_INTENSITY8_NV; 31215bd8deadSopenharmony_ci or if the internal format is either DSDT_MAG_INTENSITY_NV or 31225bd8deadSopenharmony_ci DSDT8_MAG8_INTENSITY8_NV and the format is not DSDT_MAG_VIB_NV. 31235bd8deadSopenharmony_ci 31245bd8deadSopenharmony_ci INVALID_OPERATION is generated when CopyTexImage2D, CopyTexImage1D, 31255bd8deadSopenharmony_ci CopyTexSubImage2D, or CopyTexSubImage1D is called and the internal 31265bd8deadSopenharmony_ci format of the texture array to which the pixels are to be copied 31275bd8deadSopenharmony_ci is one of HILO_NV, HILO16_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV, 31285bd8deadSopenharmony_ci DSDT_NV, DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV, DSDT_MAG_INTENSITY_NV, 31295bd8deadSopenharmony_ci or DSDT8_MAG8_INTENSITY8_NV. 31305bd8deadSopenharmony_ci 31315bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexSubImage2D or 31325bd8deadSopenharmony_ci TexSubImage1D is called and the texture array's base internal format 31335bd8deadSopenharmony_ci is not one of HILO_NV, DSDT_NV, DSDT_MAG_NV, or DSDT_INTENSITY_NV, 31345bd8deadSopenharmony_ci and the format parameter is not one of COLOR_INDEX, RED, 31355bd8deadSopenharmony_ci GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, or 31365bd8deadSopenharmony_ci LUMINANCE_ALPHA 31375bd8deadSopenharmony_ci 31385bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexSubImage2D or 31395bd8deadSopenharmony_ci TexSubImage1D is called and the texture array's base internal format 31405bd8deadSopenharmony_ci is HILO_NV and the format parameter is not HILO_NV. 31415bd8deadSopenharmony_ci 31425bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexSubImage2D or 31435bd8deadSopenharmony_ci TexSubImage1D is called and the texture array's base internal format 31445bd8deadSopenharmony_ci is DSDT_NV and the format parameter is not DSDT_NV. 31455bd8deadSopenharmony_ci 31465bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexSubImage2D or 31475bd8deadSopenharmony_ci TexSubImage1D is called and the texture array's base internal format 31485bd8deadSopenharmony_ci is DSDT_MAG_NV and the format parameter is not DSDT_MAG_NV. 31495bd8deadSopenharmony_ci 31505bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexSubImage2D 31515bd8deadSopenharmony_ci or TexSubImage1D is called and the texture array's base internal 31525bd8deadSopenharmony_ci format is DSDT_MAG_INTENSITY_NV and the format parameter is not 31535bd8deadSopenharmony_ci DSDT_MAG_VIRBANCE_NV. 31545bd8deadSopenharmony_ci 31555bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexEnv is called and the 31565bd8deadSopenharmony_ci PREVIOUS_TEXTURE_INPUT_NV parameter for texture unit i is assigned 31575bd8deadSopenharmony_ci the value TEXTUREi_ARB where f i is greater than or equal to the 31585bd8deadSopenharmony_ci current active texture unit. 31595bd8deadSopenharmony_ci 31605bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexEnv is called and the 31615bd8deadSopenharmony_ci SHADER_OPERATION_NV parameter for texture unit 0 is assigned 31625bd8deadSopenharmony_ci one of OFFSET_TEXTURE_2D_NV, OFFSET_TEXTURE_2D_SCALE_NV, 31635bd8deadSopenharmony_ci OFFSET_TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_SCALE_NV, 31645bd8deadSopenharmony_ci DEPENDENT_AR_TEXTURE_2D_NV, DEPENDENT_GB_TEXTURE_2D_NV, 31655bd8deadSopenharmony_ci DOT_PRODUCT_NV, DOT_PRODUCT_DEPTH_REPLACE_NV, 31665bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV, 31675bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, 31685bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV. 31695bd8deadSopenharmony_ci or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. 31705bd8deadSopenharmony_ci 31715bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexEnv is called 31725bd8deadSopenharmony_ci and the SHADER_OPERATION_NV parameter for texture 31735bd8deadSopenharmony_ci unit 1 is assigned one of DOT_PRODUCT_DEPTH_REPLACE_NV, 31745bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV, 31755bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, 31765bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, 31775bd8deadSopenharmony_ci or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. 31785bd8deadSopenharmony_ci 31795bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexEnv is called 31805bd8deadSopenharmony_ci and the SHADER_OPERATION_NV parameter for texture 31815bd8deadSopenharmony_ci unit 2 is assigned one of 31825bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, 31835bd8deadSopenharmony_ci or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. 31845bd8deadSopenharmony_ci 31855bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexEnv is called and the 31865bd8deadSopenharmony_ci SHADER_OPERATION_NV parameter for texture unit n-1 (where n is the 31875bd8deadSopenharmony_ci number of supported texture units) is assigned either DOT_PRODUCT_NV 31885bd8deadSopenharmony_ci or DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV. 31895bd8deadSopenharmony_ci 31905bd8deadSopenharmony_ci INVALID_OPERATION is generated when GetTexImage is called with a 31915bd8deadSopenharmony_ci color format (one of RED, GREEN, BLUE, ALPHA, RGB, RGBA, BGR, BGRA, 31925bd8deadSopenharmony_ci LUMINANCE, or LUMINANCE_ALPHA) when the texture image is of a format 31935bd8deadSopenharmony_ci type (see table 3.15) other than RGBA (the DSDT_MAG_INTENSITY_NV 31945bd8deadSopenharmony_ci base internal format does not count as an RGBA format type in this 31955bd8deadSopenharmony_ci context). 31965bd8deadSopenharmony_ci 31975bd8deadSopenharmony_ci INVALID_OPERATION is generated when GetTexImage is called with a 31985bd8deadSopenharmony_ci format of HILO_NV when the texture image is of a format type (see 31995bd8deadSopenharmony_ci table 3.15) other than HILO_NV. 32005bd8deadSopenharmony_ci 32015bd8deadSopenharmony_ci INVALID_OPERATION is generated when GetTexImage is called with a 32025bd8deadSopenharmony_ci format of DSDT_NV when the texture image is of a base internal 32035bd8deadSopenharmony_ci format other than DSDT_NV. 32045bd8deadSopenharmony_ci 32055bd8deadSopenharmony_ci INVALID_OPERATION is generated when GetTexImage is called with a 32065bd8deadSopenharmony_ci format of DSDT_MAG_NV when the texture image is of a base internal 32075bd8deadSopenharmony_ci format other than DSDT_MAG_NV. 32085bd8deadSopenharmony_ci 32095bd8deadSopenharmony_ci INVALID_OPERATION is generated when GetTexImage is called with a 32105bd8deadSopenharmony_ci format of DSDT_MAG_VIBRANCE_NV when the texture image is of a base 32115bd8deadSopenharmony_ci internal format other than DSDT_MAG_INTENSITY_NV causes the error 32125bd8deadSopenharmony_ci INVALID_OPERATION." 32135bd8deadSopenharmony_ci 32145bd8deadSopenharmony_ciNew State 32155bd8deadSopenharmony_ci 32165bd8deadSopenharmony_ciAdd the following entries to table 6.12: 32175bd8deadSopenharmony_ci 32185bd8deadSopenharmony_ciGet Value Type Get Command Initial Value Description Sec Attribute 32195bd8deadSopenharmony_ci-------------------- ------ -------------------- ------------- --------------------- --- --------- 32205bd8deadSopenharmony_ciTEXTURE_HI_SIZE_NV nxZ+ GetTexLevelParameter 0 xD texture image i's 3.8 texture 32215bd8deadSopenharmony_ci hi resolution 32225bd8deadSopenharmony_ciTEXTURE_LO_SIZE_NV nxZ+ GetTexLevelParameter 0 xD texture image i's 3.8 texture 32235bd8deadSopenharmony_ci lo resolution 32245bd8deadSopenharmony_ciTEXTURE_DS_SIZE_NV nxZ+ GetTexLevelParameter 0 xD texture image i's 3.8 texture 32255bd8deadSopenharmony_ci ds resolution 32265bd8deadSopenharmony_ciTEXTURE_DT_SIZE_NV nxZ+ GetTexLevelParameter 0 xD texture image i's 3.8 texture 32275bd8deadSopenharmony_ci dt resolution 32285bd8deadSopenharmony_ciTEXTURE_MAG_SIZE_NV nxZ+ GetTexLevelParameter 0 xD texture image i's 3.8 texture 32295bd8deadSopenharmony_ci mag resolution 32305bd8deadSopenharmony_ci 32315bd8deadSopenharmony_ciChange the TEXTURE_BORDER_COLOR line in table 6.13 to read: 32325bd8deadSopenharmony_ci 32335bd8deadSopenharmony_ciGet Value Type Get Command Initial Value Description Sec Attribute 32345bd8deadSopenharmony_ci------------------------ ------ --------------- ------------- --------------------- --- --------- 32355bd8deadSopenharmony_ciTEXTURE_BORDER_VALUES_NV 4xR GetTexParameter (0,0,0,0) Texture border values 3.8 texture 32365bd8deadSopenharmony_ci(TEXTURE_BORDER_COLOR) 32375bd8deadSopenharmony_ci 32385bd8deadSopenharmony_ciTable 6.TextureShaders. Texture Shaders. 32395bd8deadSopenharmony_ci 32405bd8deadSopenharmony_ciGet Value Type Get Command Initial Value Description Sec Attribute 32415bd8deadSopenharmony_ci--------------------------- ------ ----------- -------------------- ------------------- ------ -------------- 32425bd8deadSopenharmony_ciHI_BIAS_NV R GetFloatv 0.0 Hi bias for HILO 3.6.3 pixel 32435bd8deadSopenharmony_ciLO_BIAS_NV R GetFloatv 0.0 Lo bias for HILO 3.6.3 pixel 32445bd8deadSopenharmony_ciDS_BIAS_NV R GetFloatv 0.0 Ds bias 3.6.3 pixel 32455bd8deadSopenharmony_ciDT_BIAS_NV R GetFloatv 0.0 Dt bias 3.6.3 pixel 32465bd8deadSopenharmony_ciMAGNITUDE_BIAS_NV R GetFloatv 0.0 Magnitude bias 3.6.3 pixel 32475bd8deadSopenharmony_ciVIBRANCE_BIAS_NV R GetFloatv 0.0 Vibrance bias 3.6.3 pixel 32485bd8deadSopenharmony_ciHI_SCALE_NV R GetFloatv 1.0 Hi scale 3.6.3 pixel 32495bd8deadSopenharmony_ciLO_SCALE_NV R GetFloatv 1.0 Lo scale 3.6.3 pixel 32505bd8deadSopenharmony_ciDS_SCALE_NV R GetFloatv 1.0 Ds scale 3.6.3 pixel 32515bd8deadSopenharmony_ciDT_SCALE_NV R GetFloatv 1.0 Dt scale 3.6.3 pixel 32525bd8deadSopenharmony_ciMAGNITUDE_SCALE_NV R GetFloatv 1.0 Magnitude scale 3.6.3 pixel 32535bd8deadSopenharmony_ciVIBRANCE_SCALE_NV R GetFloatv 1.0 Vibrance scale 3.6.3 pixel 32545bd8deadSopenharmony_ci 32555bd8deadSopenharmony_ciTEXTURE_SHADER_NV B IsEnabled False Texture shaders 3.8 texture/enable 32565bd8deadSopenharmony_ci enable 32575bd8deadSopenharmony_ci 32585bd8deadSopenharmony_ciSHADER_OPERATION_NV TxZ21 GetTexEnviv NONE Texture shader 3.8.13 texture 32595bd8deadSopenharmony_ci operation 32605bd8deadSopenharmony_ciCULL_MODES_NV Tx4xZ2 GetTexEnviv GEQUAL,GEQUAL, Texture shader 3.8.13 texture 32615bd8deadSopenharmony_ci GEQUAL,GEQUAL cull fragment modes 32625bd8deadSopenharmony_ciRGBA_UNSIGNED_- TxZ2 GetTexEnviv UNSIGNED_IDENTITY_NV Texture shader RGBA 3.8.13 texture 32635bd8deadSopenharmony_ci DOT_PRODUCT_MAPPING_NV dot product mapping 32645bd8deadSopenharmony_ciPREVIOUS_TEXTURE_INPUT_NV TxZn GetTexEnviv TEXTURE0_ARB Texture shader 3.8.13 texture 32655bd8deadSopenharmony_ci previous tex input 32665bd8deadSopenharmony_ciCONST_EYE_NV TxRx3 GetTexEnvfv (0,0,-1) Shader constant 3.8.13 texture 32675bd8deadSopenharmony_ci eye vector 32685bd8deadSopenharmony_ciOFFSET_TEXTURE_MATRIX_NV TxM2 GetTexEnvfv (1,0,0,1) 2x2 texture offset 3.8.13 texture 32695bd8deadSopenharmony_ci matrix 32705bd8deadSopenharmony_ciOFFSET_TEXTURE_SCALE_NV TxR GetTexEnvfv 1 Texture offset 3.8.13 texture 32715bd8deadSopenharmony_ci scale 32725bd8deadSopenharmony_ciOFFSET_TEXTURE_BIAS_NV TxR GetTexEnvfv 0 Texture offset 3.8.13 texture 32735bd8deadSopenharmony_ci bias 32745bd8deadSopenharmony_ciSHADER_CONSISTENT_NV TxB GetTexEnviv True Texture shader 3.8.13 texture 32755bd8deadSopenharmony_ci stage consistency 32765bd8deadSopenharmony_ci 32775bd8deadSopenharmony_ci[ The "Tx" type prefix means that the state is per-texture unit. ] 32785bd8deadSopenharmony_ci 32795bd8deadSopenharmony_ci[ The "Zn" type is an n-valued integer where n is the 32805bd8deadSopenharmony_ci implementation-dependent number of texture units supported.] 32815bd8deadSopenharmony_ci 32825bd8deadSopenharmony_ciNew Implementation State 32835bd8deadSopenharmony_ci 32845bd8deadSopenharmony_ci None 32855bd8deadSopenharmony_ci 32865bd8deadSopenharmony_ciRevision History 32875bd8deadSopenharmony_ci 32885bd8deadSopenharmony_ci March 29, 2001 - document that using signed HILO with a dot product 32895bd8deadSopenharmony_ci shader forces the square root to zero if the 1.0-HI*HI-LO*LO value 32905bd8deadSopenharmony_ci is negative. 32915bd8deadSopenharmony_ci 32925bd8deadSopenharmony_ci November 15, 2001 - document that depth replace is after polygon 32935bd8deadSopenharmony_ci offset; add polygon offset issue and multisample issue. 32945bd8deadSopenharmony_ci 32955bd8deadSopenharmony_ci November 26, 2001 - Properly document the various TEXTURE_*_SIZE_NV 32965bd8deadSopenharmony_ci texture resolution query tokens. Add table 6.12 entries. 32975bd8deadSopenharmony_ci 32985bd8deadSopenharmony_ci June 5, 2002 - Driver implementations before this date 32995bd8deadSopenharmony_ci incorrectly swap the HI and LO components when specifying 33005bd8deadSopenharmony_ci GL_TEXTURE_BORDER_VALUES_NV when rendering via hardware. Drivers 33015bd8deadSopenharmony_ci after this date have fixed the problem and match the specified 33025bd8deadSopenharmony_ci behavior. 33035bd8deadSopenharmony_ci 33045bd8deadSopenharmony_ci July 2, 2003 - CULL_MODES_NV, OFFSET_TEXTURE_MATRIX_NV, 33055bd8deadSopenharmony_ci OFFSET_TEXTURE_2D_MATRIX_NV, and CONST_EYE_NV should not be specified 33065bd8deadSopenharmony_ci to work with glTexEnvi & glTexEnvf (they can only be used with 33075bd8deadSopenharmony_ci glTexEnviv & glTexEnvfv). 33085bd8deadSopenharmony_ci 33095bd8deadSopenharmony_ci October 19, 2006 - Add interaction with ARB_color_buffer_float to 33105bd8deadSopenharmony_ci document how ths extension behaves when ARB_color_buffer_float is 33115bd8deadSopenharmony_ci also supported and when its CLAMP_FRAGMENT_COLOR_ARB state is either 33125bd8deadSopenharmony_ci FIXED_ONLY_ARB when rendering to a floating-point color framebuffer 33135bd8deadSopenharmony_ci or FALSE. 33145bd8deadSopenharmony_ci 33155bd8deadSopenharmony_ci March 13, 2007 - Fix OFFSET_TEXTURE_2D_SCALE_NV operation to clamp 33165bd8deadSopenharmony_ci the scale factor to [0,1] before multiplying it by red, green, 33175bd8deadSopenharmony_ci and blue to match the hardware's actual behavior. 3318