15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci EXT_shadow_funcs 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_EXT_shadow_funcs 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Mark J. Kilgard (mjk 'at' nvidia.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciStatus 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Complete 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciVersion 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci Last Modified Date: $Date: 2002/03/22 $ 205bd8deadSopenharmony_ci NVIDIA Revision: $Revision: #5 $ 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciNumber 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci 267 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ciDependencies 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ci OpenGL 1.1 is required. 295bd8deadSopenharmony_ci ARB_depth_texture is required. 305bd8deadSopenharmony_ci ARB_shadow is required. 315bd8deadSopenharmony_ci This extension is written against the OpenGL 1.3 Specification. 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ciOverview 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci This extension generalizes the GL_ARB_shadow extension to support all 365bd8deadSopenharmony_ci eight binary texture comparison functions rather than just GL_LEQUAL 375bd8deadSopenharmony_ci and GL_GEQUAL. 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ciIP Status 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ci None. 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ciIssues 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ci (1) What should this extension be called? 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci RESOLUTION: EXT_shadow_funcs. The extension adds new texture 485bd8deadSopenharmony_ci compare (shadow) comparison functions to ARB_shadow. 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci (2) Are there issues with GL_EQUAL and GL_NOTEQUAL? 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci The GL_EQUAL mode (and GL_NOTEQUAL) may be difficult to obtain 535bd8deadSopenharmony_ci well-defined behavior from. This is because there is no guarantee 545bd8deadSopenharmony_ci that the divide done by the shadow mapping r/q division is going 555bd8deadSopenharmony_ci to exactly match the z/w perspective divide and depth range scale 565bd8deadSopenharmony_ci & bias used to generate depth values. Perhaps it can work in a 575bd8deadSopenharmony_ci well-defined manner in orthographic views or if you can guarantee 585bd8deadSopenharmony_ci that the texture hardware's r/q is computed with the same hardware 595bd8deadSopenharmony_ci used to compute z/w (NVIDIA's NV_texture_shader extension can 605bd8deadSopenharmony_ci provide such a guarantee). 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci Similiarly, GL_LESS and GL_GREATER or only different from GL_LEQUAL 635bd8deadSopenharmony_ci and GL_GEQUAL respectively by a single unit of depth precision 645bd8deadSopenharmony_ci which may make the difference between these modes very subtle. 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ciNew Procedures and Functions 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci None 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ciNew Tokens 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci None 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.3 Specification (OpenGL Operation) 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci None 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.3 Specification (Rasterization) 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci Section 3.8.4, Texture Parameters, p. 133, update table 3.19 with the 815bd8deadSopenharmony_ci following new legal values for TEXTURE_COMPARE_FUNC_ARB: 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci Name Type Legal Values 845bd8deadSopenharmony_ci -------------------------- ---- ------------------------------- 855bd8deadSopenharmony_ci TEXTURE_COMPARE_FUNC_ARB enum LEQUAL, GEQUAL, LESS, GREATER, 865bd8deadSopenharmony_ci EQUAL, NOTEQUAL, ALWAYS, NEVER 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci After section 3.8.12, Texture Environments and Texture Functions, 895bd8deadSopenharmony_ci p. 149, update the texture compare pseudo-code in section 3.8.13.1 905bd8deadSopenharmony_ci (as added by ARB_shadow): 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci if TEXTURE_COMPARE_MODE_ARB = NONE 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci r = Dt 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci else if TEXTURE_COMPARE_MODE_ARB = COMPARE_R_TO_TEXTURE_ARB 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci if TEXTURE_COMPARE_FUNC_ARB = LEQUAL 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ci { 1.0, if R <= Dt 1015bd8deadSopenharmony_ci r = { 1025bd8deadSopenharmony_ci { 0.0, if R > Dt 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci else if TEXTURE_COMPARE_FUNC_ARB = GEQUAL 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci { 1.0, if R >= Dt 1075bd8deadSopenharmony_ci r = { 1085bd8deadSopenharmony_ci { 0.0, if R < Dt 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci else if TEXTURE_COMPARE_FUNC_ARB = LESS 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ci { 1.0, if R < Dt 1135bd8deadSopenharmony_ci r = { 1145bd8deadSopenharmony_ci { 0.0, if R >= Dt 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci else if TEXTURE_COMPARE_FUNC_ARB = GREATER 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci { 1.0, if R > Dt 1195bd8deadSopenharmony_ci r = { 1205bd8deadSopenharmony_ci { 0.0, if R <= Dt 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci else if TEXTURE_COMPARE_FUNC_ARB = EQUAL 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci { 1.0, if R == Dt 1255bd8deadSopenharmony_ci r = { 1265bd8deadSopenharmony_ci { 0.0, if R != Dt 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci else if TEXTURE_COMPARE_FUNC_ARB = NOTEQUAL 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ci { 1.0, if R != Dt 1315bd8deadSopenharmony_ci r = { 1325bd8deadSopenharmony_ci { 0.0, if R == Dt 1335bd8deadSopenharmony_ci 1345bd8deadSopenharmony_ci else if TEXTURE_COMPARE_FUNC_ARB = ALWAYS 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci r = 1.0 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci else if TEXTURE_COMPARE_FUNC_ARB = NEVER 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ci r = 0.0 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ci endif 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci if DEPTH_TEXTURE_MODE_ARB = LUMINANCE 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci Lt = r 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ci else if DEPTH_TEXTURE_MODE_ARB = INTENSITY 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci It = r 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ci else if DEPTH_TEXTURE_MODE_ARB = ALPHA 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci At = r 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ci endif 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci endif 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.3 Specification (Per-Fragment Operations 1615bd8deadSopenharmony_ciand the Frame Buffer) 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ci None 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.3 Specification (Special Functions) 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ci None 1685bd8deadSopenharmony_ci 1695bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.3 Specification (State and State Requests) 1705bd8deadSopenharmony_ci 1715bd8deadSopenharmony_ci None 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ciAdditions to the GLX Specification 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci None 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ciErrors 1785bd8deadSopenharmony_ci 1795bd8deadSopenharmony_ci INVALID_ENUM is generated if TexParameter[if][v] parameter <pname> 1805bd8deadSopenharmony_ci is TEXTURE_COMPARE_FUNC_ARB and parameter <param> is not one of 1815bd8deadSopenharmony_ci LEQUAL, GEQUAL, LESS, GREATER, EQUAL, NOTEQUAL, ALWAYS, or NEVER. 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ciNew State 1845bd8deadSopenharmony_ci 1855bd8deadSopenharmony_ci In table 6.16, Texture Objects, p. 224, add the following: 1865bd8deadSopenharmony_ci 1875bd8deadSopenharmony_ci Get Value Type Get Command Initial Value Description Sec. Attribute 1885bd8deadSopenharmony_ci -------------------------- ---- -------------------- ------------- -------------- ----- --------- 1895bd8deadSopenharmony_ci TEXTURE_COMPARE_FUNC_ARB Z_8 GetTexParameter[if]v LEQUAL compare func 3.8.13 texture 1905bd8deadSopenharmony_ci 1915bd8deadSopenharmony_ciNew Implementation Dependent State 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ci None 1945bd8deadSopenharmony_ci 1955bd8deadSopenharmony_ciRevision History 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci None 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ciNV20 Implementation Details 2005bd8deadSopenharmony_ci 2015bd8deadSopenharmony_ci NV20 (GeForce3 and Quadro DCC) will fallback to software rasterization 2025bd8deadSopenharmony_ci if two or more texture units have distinct TEXTURE_COMPARE_FUNC_ARB 2035bd8deadSopenharmony_ci settings that are not opposites (eg, GL_EQUAL and GL_NOTEQUAL). 2045bd8deadSopenharmony_ci This is not an issue on NV25 (GeForce4 and Quadro4). 205