15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci EXT_texture_rg 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_EXT_texture_rg 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContributors 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Contributors to ARB_texture_rg, on which this extension is based 125bd8deadSopenharmony_ci Kyle Haughey 135bd8deadSopenharmony_ci Richard Schreyer 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ciContact 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ci Benj Lipchak, Apple (lipchak 'at' apple.com) 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ciStatus 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ci Complete 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciVersion 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci Date: July 22, 2011 265bd8deadSopenharmony_ci Revision: 3 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ciNumber 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci OpenGL ES Extension #103 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciDependencies 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci Requires OpenGL ES 2.0. 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ci Written based on the wording of the OpenGL ES 2.0.25 Full Specification 375bd8deadSopenharmony_ci (November 2, 2010). 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci OES_texture_float affects the definition of this extension. 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ci OES_texture_half_float affects the definition of this extension. 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci APPLE_framebuffer_multisample affects the definition of this extension. 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ciOverview 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci Historically one- and two-component textures have been specified in OpenGL 485bd8deadSopenharmony_ci ES using the luminance or luminance-alpha (L/LA) formats. With the advent 495bd8deadSopenharmony_ci of programmable shaders and render-to-texture capabilities these legacy 505bd8deadSopenharmony_ci formats carry some historical artifacts which are no longer useful. 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci For example, when sampling from such textures, the luminance values are 535bd8deadSopenharmony_ci replicated across the color components. This is no longer necessary with 545bd8deadSopenharmony_ci programmable shaders. 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci It is also desirable to be able to render to one- and two-component format 575bd8deadSopenharmony_ci textures using capabilities such as framebuffer objects (FBO), but 585bd8deadSopenharmony_ci rendering to L/LA formats is under-specified (specifically how to map 595bd8deadSopenharmony_ci R/G/B/A values to L/A texture channels). 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci This extension adds new base internal formats for one-component RED and 625bd8deadSopenharmony_ci two-component RG (red green) textures as well as sized RED and RG internal 635bd8deadSopenharmony_ci formats for renderbuffers. The RED and RG texture formats can be used for 645bd8deadSopenharmony_ci both texturing and rendering into with framebuffer objects. 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ciNew Procedures and Functions 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci None 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ciNew Tokens 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci Accepted by the <internalformat> parameter of TexImage2D and CopyTexImage2D, 735bd8deadSopenharmony_ci and the <format> parameter of TexImage2D, TexSubImage2D, and ReadPixels: 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci RED_EXT 0x1903 765bd8deadSopenharmony_ci RG_EXT 0x8227 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci Accepted by the <internalformat> parameter of RenderbufferStorage and 795bd8deadSopenharmony_ci RenderbufferStorageMultisampleAPPLE: 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci R8_EXT 0x8229 825bd8deadSopenharmony_ci RG8_EXT 0x822B 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL ES Operation) 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci None 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci (Add the following to Table 3.3: "TexImage2D and ReadPixels formats") 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci Format Name Element Meaning and Order Target Buffer 935bd8deadSopenharmony_ci ----------- ------------------------- ------------- 945bd8deadSopenharmony_ci RED_EXT R Color 955bd8deadSopenharmony_ci RG_EXT R, G Color 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci (Add the following to Table 3.4: "Valid pixel format and type combinations") 985bd8deadSopenharmony_ci (as modified by OES_texture_float and OES_texture_half_float) 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ci Format Type Bytes per Pixel 1015bd8deadSopenharmony_ci ----------- ------------------------- --------------- 1025bd8deadSopenharmony_ci RED_EXT FLOAT 4 1035bd8deadSopenharmony_ci RED_EXT HALF_FLOAT_OES 2 1045bd8deadSopenharmony_ci RED_EXT UNSIGNED_BYTE 1 1055bd8deadSopenharmony_ci RG_EXT FLOAT 8 1065bd8deadSopenharmony_ci RG_EXT HALF_FLOAT_OES 4 1075bd8deadSopenharmony_ci RG_EXT UNSIGNED_BYTE 2 1085bd8deadSopenharmony_ci 1095bd8deadSopenharmony_ci (Add the following to Table 3.8: "Conversion from RGBA and depth pixel 1105bd8deadSopenharmony_ci components to internal texture") 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ci Base Internal Format RGBA Internal Components 1135bd8deadSopenharmony_ci -------------------- ------ ------------------- 1145bd8deadSopenharmony_ci RED_EXT R R 1155bd8deadSopenharmony_ci RG_EXT R,G R,G 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ci (Modify Table 3.9: "CopyTexImage internal format/color buffer combinations") 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci Texture Format 1205bd8deadSopenharmony_ci Color Buffer A L LA R RG RGB RGBA 1215bd8deadSopenharmony_ci ------------ - - -- - -- --- ---- 1225bd8deadSopenharmony_ci A X 1235bd8deadSopenharmony_ci R X X 1245bd8deadSopenharmony_ci RG X X X 1255bd8deadSopenharmony_ci RGB X X X X 1265bd8deadSopenharmony_ci RGBA X X X X X X X 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci (Add the following to Table 3.12: "Correspondence of filtered texture 1295bd8deadSopenharmony_ci components to texture source color components") 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci Texture Base Texture source color 1325bd8deadSopenharmony_ci Internal Format C_s A_s 1335bd8deadSopenharmony_ci --------------- ------------- ------ 1345bd8deadSopenharmony_ci RED_EXT (R_t, 0, 0) 1 1355bd8deadSopenharmony_ci RG_EXT (R_t, G_t, 0) 1 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment 1385bd8deadSopenharmony_ciOperations and the Framebuffer) 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ci In section 4.3.1 "Reading Pixels", subsection "Obtaining Pixels from the 1415bd8deadSopenharmony_ci Framebuffer", modify the last sentence to read: 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ci "If the framebuffer does not support G, B, or A values then the G, B, and A 1445bd8deadSopenharmony_ci values that are obtained are 0.0, 0.0, and 1.0 respectively." 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci In section 4.4.5 "Framebuffer Completeness", modify the last sentence of 1475bd8deadSopenharmony_ci the second paragraph to read: 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci "Color-renderable formats contain red, and possibly green, blue, and alpha 1505bd8deadSopenharmony_ci components; depth-renderable formats contain depth components; and 1515bd8deadSopenharmony_ci stencil-renderable formats contain stencil components." 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ci (Add the following to Table 4.5: "Renderbuffer image formats, showing their 1545bd8deadSopenharmony_ci renderable type (color-, depth-, or stencil-renderable) and the number of 1555bd8deadSopenharmony_ci bits each format contains for color (R, G, B, A), depth (D), and stencil 1565bd8deadSopenharmony_ci (S) components") 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci Sized Internal Renderable Type R bits G bits B bits A bits D bits S bits 1595bd8deadSopenharmony_ci Format 1605bd8deadSopenharmony_ci -------------- ---------------- ------ ------ ------ ------ ------ ------ 1615bd8deadSopenharmony_ci R8_EXT color-renderable 8 1625bd8deadSopenharmony_ci RG8_EXT color-renderable 8 8 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions) 1655bd8deadSopenharmony_ci 1665bd8deadSopenharmony_ci None 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State 1695bd8deadSopenharmony_ciRequests) 1705bd8deadSopenharmony_ci 1715bd8deadSopenharmony_ci None 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ciDependencies on OES_texture_float 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci If OES_texture_float is not supported, then omit the rows of 1765bd8deadSopenharmony_ci Table 3.4 that have Type FLOAT. 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ciDependencies on OES_texture_half_float 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ci If OES_texture_half_float is not supported, then omit the rows of 1815bd8deadSopenharmony_ci Table 3.4 that have Type HALF_FLOAT_OES. 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ciDependencies on APPLE_framebuffer_multisample 1845bd8deadSopenharmony_ci 1855bd8deadSopenharmony_ci If APPLE_framebuffer_multisample is not supported, then all references to 1865bd8deadSopenharmony_ci RenderbufferStorageMultisampleAPPLE should be ignored. 1875bd8deadSopenharmony_ci 1885bd8deadSopenharmony_ciRevision History 1895bd8deadSopenharmony_ci 1905bd8deadSopenharmony_ci #1 February 22, 2011, khaughey 1915bd8deadSopenharmony_ci - initial version adapted from ARB_texture_rg. 1925bd8deadSopenharmony_ci #2 June 16, 2011, benj 1935bd8deadSopenharmony_ci - add interaction with APPLE_framebuffer_multisample 1945bd8deadSopenharmony_ci #3 July 22, 2011, benj 1955bd8deadSopenharmony_ci - rename from APPLE to EXT 196