7 GL_EXT_shader_integer_mix
11 Matt Turner
(matt.turner 'at' intel.com
)
24 Last Modified Date
: 09/12/2013
33 OpenGL
3.0 or OpenGL ES
3.0 is required. This extension interacts with
34 GL_ARB_ES3_compatibility.
36 This extension is written against the OpenGL
4.4 (core
) specification
37 and the GLSL
4.40 specification.
41 GLSL
1.30 (and GLSL ES
3.00) expanded the mix
() built
-in function to
42 operate on a boolean third argument that does not interpolate but
43 selects. This extension extends mix
() to
select between int
, uint
,
46 New Procedures and Functions
54 Additions to Chapter
8 of the GLSL
4.40 Specification
(Built
-in Functions
)
56 Modify Section
8.3, Common Functions
58 Additions to the table listing common built
-in functions
:
61 --------------------------- --------------------------------------------------
62 genIType mix
(genIType x
, Selects which vector each returned component comes
63 genIType y
, from. For a component of a that is false
, the
64 genBType a
) corresponding component of x is returned. For a
65 genUType mix
(genUType x
, component of a that is true
, the corresponding
66 genUType y
, component of y is returned.
68 genBType mix
(genBType x
,
72 Additions to the AGL
/GLX
/WGL Specifications
76 Modifications to The OpenGL Shading Language Specification
, Version 4.40
78 Including the following line
in a shader can be used to control the
79 language features described
in this extension
:
81 #extension GL_EXT_shader_integer_mix : <behavior>
83 where
<behavior
> is as specified
in section
3.3.
85 New preprocessor
#defines are added to the OpenGL Shading Language:
87 #define GL_EXT_shader_integer_mix 1
89 Interactions with ARB_ES3_compatibility
91 On desktop implementations that support ARB_ES3_compatibility
,
92 GL_EXT_shader_integer_mix can be enabled
(and the new functions
93 used
) in shaders declared with '
#version 300 es'.
107 New Implementation Dependent State
113 1) Should we allow linear interpolation of integers via a non
-boolean
118 2) Should we allow mix
() to
select between boolean components?
120 RESOLVED
: Yes. Implementing the same functionality using casts would be
125 Rev. Date Author Changes
126 ---- -------- -------- ---------------------------------------------
127 6 09/12/2013 idr After discussions
in Khronos
, change vendor
130 5 09/09/2013 idr Add ARB_ES3_compatibility interaction.
132 4 09/06/2013 mattst88 Allow extension on OpenGL ES
3.0.
134 3 08/28/2013 mattst88 Add
#extension/#define changes.
136 2 08/26/2013 mattst88 Change vendor prefix to MESA. Add mix
() that
137 selects between boolean components.
138 1 08/26/2013 mattst88 Initial revision