15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci EXT_shader_integer_mix 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_EXT_shader_integer_mix 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Matt Turner (matt.turner 'at' intel.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Matt Turner, Intel 165bd8deadSopenharmony_ci Ian Romanick, Intel 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciStatus 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci Shipping 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciVersion 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci Last Modified Date: 09/12/2013 255bd8deadSopenharmony_ci Author Revision: 6 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ciNumber 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ci OpenGL Extension #437 305bd8deadSopenharmony_ci OpenGL ES Extension #161 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciDependencies 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci OpenGL 3.0 or OpenGL ES 3.0 is required. This extension interacts with 355bd8deadSopenharmony_ci GL_ARB_ES3_compatibility. 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci This extension is written against the OpenGL 4.4 (core) specification 385bd8deadSopenharmony_ci and the GLSL 4.40 specification. 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciOverview 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci GLSL 1.30 (and GLSL ES 3.00) expanded the mix() built-in function to 435bd8deadSopenharmony_ci operate on a boolean third argument that does not interpolate but 445bd8deadSopenharmony_ci selects. This extension extends mix() to select between int, uint, 455bd8deadSopenharmony_ci and bool components. 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ciNew Procedures and Functions 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci None. 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ciNew Tokens 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci None. 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ciAdditions to Chapter 8 of the GLSL 4.40 Specification (Built-in Functions) 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci Modify Section 8.3, Common Functions 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci Additions to the table listing common built-in functions: 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci Syntax Description 625bd8deadSopenharmony_ci --------------------------- -------------------------------------------------- 635bd8deadSopenharmony_ci genIType mix(genIType x, Selects which vector each returned component comes 645bd8deadSopenharmony_ci genIType y, from. For a component of a that is false, the 655bd8deadSopenharmony_ci genBType a) corresponding component of x is returned. For a 665bd8deadSopenharmony_ci genUType mix(genUType x, component of a that is true, the corresponding 675bd8deadSopenharmony_ci genUType y, component of y is returned. 685bd8deadSopenharmony_ci genBType a) 695bd8deadSopenharmony_ci genBType mix(genBType x, 705bd8deadSopenharmony_ci genBType y, 715bd8deadSopenharmony_ci genBType a) 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci None. 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ciModifications to The OpenGL Shading Language Specification, Version 4.40 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ci Including the following line in a shader can be used to control the 805bd8deadSopenharmony_ci language features described in this extension: 815bd8deadSopenharmony_ci 825bd8deadSopenharmony_ci #extension GL_EXT_shader_integer_mix : <behavior> 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ci where <behavior> is as specified in section 3.3. 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci New preprocessor #defines are added to the OpenGL Shading Language: 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci #define GL_EXT_shader_integer_mix 1 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ciInteractions with ARB_ES3_compatibility 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci On desktop implementations that support ARB_ES3_compatibility, 935bd8deadSopenharmony_ci GL_EXT_shader_integer_mix can be enabled (and the new functions 945bd8deadSopenharmony_ci used) in shaders declared with '#version 300 es'. 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ciGLX Protocol 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci None. 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ciErrors 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ci None. 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ciNew State 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci None. 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ciNew Implementation Dependent State 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci None. 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ciIssues 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci 1) Should we allow linear interpolation of integers via a non-boolean 1155bd8deadSopenharmony_ci third component? 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ci RESOLVED: No. 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci 2) Should we allow mix() to select between boolean components? 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci RESOLVED: Yes. Implementing the same functionality using casts would be 1225bd8deadSopenharmony_ci possible but ugly. 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ciRevision History 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci Rev. Date Author Changes 1275bd8deadSopenharmony_ci ---- -------- -------- --------------------------------------------- 1285bd8deadSopenharmony_ci 6 09/12/2013 idr After discussions in Khronos, change vendor 1295bd8deadSopenharmony_ci prefix to EXT. 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci 5 09/09/2013 idr Add ARB_ES3_compatibility interaction. 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci 4 09/06/2013 mattst88 Allow extension on OpenGL ES 3.0. 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci 3 08/28/2013 mattst88 Add #extension/#define changes. 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ci 2 08/26/2013 mattst88 Change vendor prefix to MESA. Add mix() that 1385bd8deadSopenharmony_ci selects between boolean components. 1395bd8deadSopenharmony_ci 1 08/26/2013 mattst88 Initial revision 140