-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proposal: EXT_blend_func_extended (#3553)
- Loading branch information
1 parent
a93abc9
commit 16b1297
Showing
1 changed file
with
148 additions
and
0 deletions.
There are no files selected for viewing
148 changes: 148 additions & 0 deletions
148
extensions/proposals/EXT_blend_func_extended/extension.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<proposal href="proposals/EXT_blend_func_extended/"> | ||
<name>EXT_blend_func_extended</name> | ||
|
||
<contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL | ||
working group</a> (public_webgl 'at' khronos.org) </contact> | ||
|
||
<contributors> | ||
<contributor>Members of the WebGL working group</contributor> | ||
</contributors> | ||
|
||
<number>NN</number> | ||
|
||
<depends> | ||
<api version="1.0"/> | ||
</depends> | ||
|
||
<overview> | ||
<mirrors href="https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_blend_func_extended.txt" | ||
name="EXT_blend_func_extended"> | ||
<addendum> | ||
None of the new functions are supported. | ||
</addendum> | ||
<addendum> | ||
Automatic location assignment of fragment outputs is not supported. | ||
</addendum> | ||
<addendum> | ||
<p> | ||
<code>INVALID_OPERATION</code> is generated by attempting to draw | ||
when any of the new blend factors are used for an active draw buffer, | ||
which has blending enabled, and the fragment shader does not | ||
</p> | ||
<ul> | ||
<li> | ||
<strong>ESSL 1.00:</strong> statically write to <code>gl_SecondaryFragColorEXT</code> | ||
or to the appropriate element of the <code>gl_SecondaryFragDataEXT[]</code> array. | ||
</li> | ||
<li> | ||
<strong>ESSL 3.00:</strong> statically bind a compatible fragment output as the | ||
secondary blending source for the corresponding draw buffer. | ||
</li> | ||
</ul> | ||
</addendum> | ||
</mirrors> | ||
<features> | ||
<glsl extname="GL_EXT_blend_func_extended"> | ||
<stage type="fragment"/> | ||
<constant name="gl_MaxDualSourceDrawBuffersEXT" type="int" /> | ||
<feature> | ||
<strong>ESSL 1.00:</strong> <code>gl_SecondaryFragColorEXT</code> and | ||
<code>gl_SecondaryFragDataEXT[]</code> are built-in outputs. | ||
</feature> | ||
<feature> | ||
<strong>ESSL 3.00:</strong> An <code>index</code> layout qualifier may be | ||
used to bind fragment shader outputs as secondary blend sources. | ||
</feature> | ||
</glsl> | ||
</features> | ||
</overview> | ||
|
||
<idl xml:space="preserve"> | ||
[Exposed=(Window,Worker), LegacyNoInterfaceObject] | ||
interface EXT_blend_func_extended { | ||
const GLenum SRC1_COLOR_EXT = 0x88F9; | ||
const GLenum SRC1_ALPHA_EXT = 0x8589; | ||
const GLenum ONE_MINUS_SRC1_COLOR_EXT = 0x88FA; | ||
const GLenum ONE_MINUS_SRC1_ALPHA_EXT = 0x88FB; | ||
const GLenum MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT = 0x88FC; | ||
}; | ||
</idl> | ||
|
||
<newtok> | ||
<function name="blendFunc" type="undefined"> | ||
<param name="src" type="GLenum"/> | ||
<param name="dst" type="GLenum"/> | ||
<p> | ||
New enums <code>SRC1_COLOR_EXT</code>, <code>SRC1_ALPHA_EXT</code>, | ||
<code>ONE_MINUS_SRC1_COLOR_EXT</code>, and <code>ONE_MINUS_SRC1_ALPHA_EXT</code> are accepted | ||
as the <code>src</code> and <code>dst</code> parameters. | ||
</p> | ||
<p> | ||
<strong>WebGL 1.0:</strong> An existing enum <code>SRC_ALPHA_SATURATE</code> is accepted | ||
as the <code>dst</code> parameter. | ||
</p> | ||
</function> | ||
|
||
<function name="blendFuncSeparate" type="undefined"> | ||
<param name="srcRGB" type="GLenum"/> | ||
<param name="dstRGB" type="GLenum"/> | ||
<param name="srcAlpha" type="GLenum"/> | ||
<param name="dstAlpha" type="GLenum"/> | ||
<p> | ||
New enums <code>SRC1_COLOR_EXT</code>, <code>SRC1_ALPHA_EXT</code>, | ||
<code>ONE_MINUS_SRC1_COLOR_EXT</code>, and <code>ONE_MINUS_SRC1_ALPHA_EXT</code> | ||
are accepted as the <code>srcRGB</code>, <code>dstRGB</code>, <code>srcAlpha</code>, | ||
and <code>dstAlpha</code> parameters. | ||
</p> | ||
<p> | ||
<strong>WebGL 1.0:</strong> An existing enum <code>SRC_ALPHA_SATURATE</code> is accepted | ||
as the <code>dstRGB</code> and <code>dstAlpha</code> parameters. | ||
</p> | ||
</function> | ||
|
||
<function name="blendFunciOES" type="undefined"> | ||
<param name="buf" type="GLuint"/> | ||
<param name="src" type="GLenum"/> | ||
<param name="dst" type="GLenum"/> | ||
When <a href="../../OES_draw_buffers_indexed/">OES_draw_buffers_indexed</a> is enabled, | ||
new enums <code>SRC1_COLOR_EXT</code>, | ||
<code>SRC1_ALPHA_EXT</code>, <code>ONE_MINUS_SRC1_COLOR_EXT</code>, and | ||
<code>ONE_MINUS_SRC1_ALPHA_EXT</code> are accepted as the <code>src</code> and <code>dst</code> | ||
parameters. | ||
</function> | ||
|
||
<function name="blendFuncSeparateiOES" type="undefined"> | ||
<param name="buf" type="GLuint"/> | ||
<param name="srcRGB" type="GLenum"/> | ||
<param name="dstRGB" type="GLenum"/> | ||
<param name="srcAlpha" type="GLenum"/> | ||
<param name="dstAlpha" type="GLenum"/> | ||
When <a href="../../OES_draw_buffers_indexed/">OES_draw_buffers_indexed</a> is enabled, | ||
new enums <code>SRC1_COLOR_EXT</code>, | ||
<code>SRC1_ALPHA_EXT</code>, <code>ONE_MINUS_SRC1_COLOR_EXT</code>, and | ||
<code>ONE_MINUS_SRC1_ALPHA_EXT</code> are accepted as the <code>srcRGB</code>, | ||
<code>dstRGB</code>, <code>srcAlpha</code>, and <code>dstAlpha</code> parameters. | ||
</function> | ||
|
||
<function name="getParameter" type="any"> | ||
<param name="pname" type="GLenum"/> | ||
<p> | ||
New <code>MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT</code> enum is accepted as the <code>pname</code> parameter. | ||
</p> | ||
<p> | ||
The return type of this method depends on the parameter queried: | ||
</p> | ||
<table class="foo"> | ||
<tr><th>pname</th><th>returned type</th></tr> | ||
<tr><td>MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT</td><td>GLint</td></tr> | ||
</table> | ||
</function> | ||
</newtok> | ||
|
||
<history> | ||
<revision date="2023/06/01"> | ||
<change>Initial Draft.</change> | ||
</revision> | ||
</history> | ||
</proposal> |