15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci SGIX_texture_scale_bias 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_SGIX_texture_scale_bias 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci $Date: 1997/02/26 03:36:38 $ $Revision: 1.9 $ 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNumber 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci 56 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciDependencies 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci EXT_texture 205bd8deadSopenharmony_ci EXT_texture3D 215bd8deadSopenharmony_ci EXT_texture_object 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciOverview 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci This extension adds scale, bias, and clamp to [0, 1] operations to the 265bd8deadSopenharmony_ci texture pipeline. 275bd8deadSopenharmony_ci These operations are applied to the filtered result of a texture lookup, 285bd8deadSopenharmony_ci before that result is used in the texture environment equations and 295bd8deadSopenharmony_ci before the texture color lookup table of SGI_texture_color_table, 305bd8deadSopenharmony_ci if that extension exists. 315bd8deadSopenharmony_ci These operations are distinct from the scale, bias, and clamp operations 325bd8deadSopenharmony_ci that appear in the SGI_color_table extension, which are used to 335bd8deadSopenharmony_ci define a color lookup table. 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci Scale and bias operations on texels can be used to better utilize the 365bd8deadSopenharmony_ci color resolution of a particular texture internal format (see EXT_texture). 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ciIssues 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci * still missing: GLX protocol, registry number 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci * RE and IMPACT do not have hardware support for this extension. 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ciNew Procedures and Functions 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci None 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ciNew Tokens 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci Accepted by the <pname> parameters of TexParameterfv, TexParameteriv, 515bd8deadSopenharmony_ci and GetTexParameter: 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 545bd8deadSopenharmony_ci POST_TEXTURE_FILTER_SCALE_SGIX 0x817A 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci Accepted by the <pname> parameters of GetBooleanv, GetDoublev, GetFloatv, 575bd8deadSopenharmony_ci and GetIntegerv: 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B 605bd8deadSopenharmony_ci POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ci None 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization) 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci A scale or bias is specified using TexParameterfv or 695bd8deadSopenharmony_ci TexParameteriv with a <pname> of either POST_TEXTURE_FILTER_SCALE_SGIX 705bd8deadSopenharmony_ci or POST_TEXTURE_FILTER_BIAS_SGIX and with <params> set to an array of 715bd8deadSopenharmony_ci four values. The scale or bias values can be queried using 725bd8deadSopenharmony_ci GetTexParameterfv or GetTexParameteriv. 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci The scale, bias, and clamp operations are applied, in that order, 755bd8deadSopenharmony_ci directly before the texture environment equations, or, if the 765bd8deadSopenharmony_ci SGI_texture_color_table extension exists, directly before the 775bd8deadSopenharmony_ci texture color lookup table. 785bd8deadSopenharmony_ci The four values for scale (or bias) correspond to the R, G, B, 795bd8deadSopenharmony_ci and A scale (or bias) factors. 805bd8deadSopenharmony_ci These are applied to the corresponding texture components, Rt, Gt, 815bd8deadSopenharmony_ci Bt, and At, as denoted in the EXT_texture extension. 825bd8deadSopenharmony_ci Following the scale and bias is a clamp to [0, 1]. 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ci The scale, bias, and clamp operations are effectively disabled by 855bd8deadSopenharmony_ci setting the four scale values to 1 and the four bias values to 0. 865bd8deadSopenharmony_ci There is no specific enable or disable token for this extension. 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations and the 895bd8deadSopenharmony_ci Frame Buffer) 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ci None 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions) 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci None 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests) 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ci The specification for "EXT_texture_object" describes the state that 1005bd8deadSopenharmony_ci comprises a texture object. Here it is rewritten to include the 1015bd8deadSopenharmony_ci scale and bias state: 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci "A texture object comprises the image arrays, priority, border color, 1045bd8deadSopenharmony_ci filter modes, and wrap modes that are associated with that object. More 1055bd8deadSopenharmony_ci explicitly, the state list 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci TEXTURE, 1085bd8deadSopenharmony_ci TEXTURE_PRIORITY_EXT 1095bd8deadSopenharmony_ci TEXTURE_RED_SIZE, 1105bd8deadSopenharmony_ci TEXTURE_GREEN_SIZE, 1115bd8deadSopenharmony_ci TEXTURE_BLUE_SIZE, 1125bd8deadSopenharmony_ci TEXTURE_ALPHA_SIZE, 1135bd8deadSopenharmony_ci TEXTURE_LUMINANCE_SIZE, 1145bd8deadSopenharmony_ci TEXTURE_INTENSITY_SIZE, 1155bd8deadSopenharmony_ci TEXTURE_WIDTH, 1165bd8deadSopenharmony_ci TEXTURE_HEIGHT, 1175bd8deadSopenharmony_ci TEXTURE_DEPTH_EXT, 1185bd8deadSopenharmony_ci TEXTURE_BORDER, 1195bd8deadSopenharmony_ci TEXTURE_COMPONENTS, 1205bd8deadSopenharmony_ci TEXTURE_BORDER_COLOR, 1215bd8deadSopenharmony_ci TEXTURE_MIN_FILTER, 1225bd8deadSopenharmony_ci TEXTURE_MAG_FILTER, 1235bd8deadSopenharmony_ci TEXTURE_WRAP_S, 1245bd8deadSopenharmony_ci TEXTURE_WRAP_T, 1255bd8deadSopenharmony_ci TEXTURE_WRAP_R_EXT, 1265bd8deadSopenharmony_ci POST_TEXTURE_FILTER_BIAS_SGIX, 1275bd8deadSopenharmony_ci POST_TEXTURE_FILTER_SCALE_SGIX 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci composes a single texture object." 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci Since an implementation may have a limited range for the values of scale 1325bd8deadSopenharmony_ci and bias (e.g. due to hardware constraints), this range can be queried. 1335bd8deadSopenharmony_ci The scale or bias range is obtained using GetFloatv (or other Get) with a 1345bd8deadSopenharmony_ci <value> of POST_TEXTURE_FILTER_SCALE_RANGE_SGIX or 1355bd8deadSopenharmony_ci POST_TEXTURE_FILTER_BIAS_RANGE_SGIX, respectively. An array of two floats 1365bd8deadSopenharmony_ci is returned. The first is the minimum value and the second is the maximum 1375bd8deadSopenharmony_ci value. 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ciAdditions to the GLX Specification 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci None 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ciGLX Protocol 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ci XXX 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ciDependencies on EXT_texture 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci This extension refers to texture components as Rt, Gt, Bt, and At, 1505bd8deadSopenharmony_ci as denoted in the EXT_texture extension. 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ciDependencies on EXT_texture3D 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci If EXT_texture3D is not implemented, references to it should be deleted. 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ciDependencies on EXT_texture_object 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci As described above, the scale and bias state is included as part of the 1595bd8deadSopenharmony_ci texture object state. 1605bd8deadSopenharmony_ci If EXT_texture_object is not implemented, references to it should be deleted. 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ciErrors 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci POST_TEXTURE_FILTER_BIAS_SGIX and POST_TEXTURE_FILTER_SCALE_SGIX are added 1655bd8deadSopenharmony_ci to the list of <pname> parameters that are accepted by TexParameter[fi]v 1665bd8deadSopenharmony_ci and GetTexParameter[fi]v. POST_TEXTURE_FILTER_BIAS_RANGE_SGIX and 1675bd8deadSopenharmony_ci POST_TEXTURE_FILTER_SCALE_RANGE_SGIX are added to the list of <value> 1685bd8deadSopenharmony_ci parameters that are accepted by Get. 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ciNew State 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci Get Value Get Command Type Initial Value Attribute 1735bd8deadSopenharmony_ci --------- ----------- ---- ------------- --------- 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci POST_TEXTURE_FILTER_BIAS_SGIX GetTexParameterfv n x 4 x R (0,0,0,0) texture 1765bd8deadSopenharmony_ci POST_TEXTURE_FILTER_SCALE_SGIX GetTexParameterfv n x 4 x R (1,1,1,1) texture 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ci Note: The "Type" column shows "n x ..." since this state will appear 1795bd8deadSopenharmony_ci in each of "n" texture objects defined by EXT_texture_object. 1805bd8deadSopenharmony_ci If EXT_texture_object is not implemented, then this state will appear 1815bd8deadSopenharmony_ci for each texture dimension (e.g. TEXTURE_1D, TEXTURE_2D, ...). 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ciNew Implementation Dependent State 1845bd8deadSopenharmony_ci 1855bd8deadSopenharmony_ci Get Value Get Command Type Minimum Value Attribute 1865bd8deadSopenharmony_ci --------- ----------- ---- ------------- --------- 1875bd8deadSopenharmony_ci 1885bd8deadSopenharmony_ci POST_TEXTURE_FILTER_BIAS_RANGE_SGIX GetFloatv 2 x R (0,1) - 1895bd8deadSopenharmony_ci POST_TEXTURE_FILTER_SCALE_RANGE_SGIX GetFloatv 2 x R (0,1) - 1905bd8deadSopenharmony_ci 1915bd8deadSopenharmony_ci Note: The "Minimum Value" for POST_TEXTURE_FILTER_BIAS_RANGE_SGIX and 1925bd8deadSopenharmony_ci POST_TEXTURE_FILTER_SCALE_RANGE_SGIX is listed as a range, which might seem 1935bd8deadSopenharmony_ci confusing. What is meant is that an implementation will support at least 1945bd8deadSopenharmony_ci the range listed. 195