| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
|
| 3 |
<?xml-stylesheet href="../../extension.xsl" type="text/xsl"?> |
| 4 |
<proposal href="proposals/EXT_clip_cull_distance/"> |
| 5 |
<name>EXT_clip_cull_distance</name> |
| 6 |
|
| 7 |
<contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL |
| 8 |
working group</a> (public_webgl 'at' khronos.org) </contact> |
| 9 |
|
| 10 |
<contributors> |
| 11 |
<contributor>Members of the WebGL working group</contributor> |
| 12 |
</contributors> |
| 13 |
|
| 14 |
<number>XYZ</number> |
| 15 |
|
| 16 |
<depends> |
| 17 |
<api version="2.0"/> |
| 18 |
</depends> |
| 19 |
|
| 20 |
<overview> |
| 21 |
<mirrors href="https://www.khronos.org/registry/gles/extensions/EXT/EXT_clip_cull_distance.txt" |
| 22 |
name="EXT_clip_cull_distance"> |
| 23 |
</mirrors> |
| 24 |
|
| 25 |
<features> |
| 26 |
<feature> |
| 27 |
Adds support for hardware clip planes and cull distances to OpenGL ES. |
| 28 |
</feature> |
| 29 |
<glsl extname="GL_EXT_clip_cull_distance"> |
| 30 |
<stage type="vertex"/> |
| 31 |
<output name="gl_ClipDistance" type="highp float" suffix="[]"/> |
| 32 |
<output name="gl_CullDistance" type="highp float" suffix="[]"/> |
| 33 |
<stage type="fragment"/> |
| 34 |
<input name="gl_ClipDistance" type="highp float" suffix="[]"/> |
| 35 |
<input name="gl_CullDistance" type="highp float" suffix="[]"/> |
| 36 |
</glsl> |
| 37 |
</features> |
| 38 |
</overview> |
| 39 |
|
| 40 |
<idl xml:space="preserve"> |
| 41 |
[NoInterfaceObject] |
| 42 |
interface EXT_clip_cull_distance { |
| 43 |
const GLenum MAX_CLIP_DISTANCES_EXT = 0x0D32; |
| 44 |
const GLenum MAX_CULL_DISTANCES_EXT = 0x82F9; |
| 45 |
const GLenum MAX_COMBINED_CLIP_AND_CULL_DISTANCES_EXT = 0x82FA; |
| 46 |
|
| 47 |
const GLenum CLIP_DISTANCE0_EXT = 0x3000; |
| 48 |
const GLenum CLIP_DISTANCE1_EXT = 0x3001; |
| 49 |
const GLenum CLIP_DISTANCE2_EXT = 0x3002; |
| 50 |
const GLenum CLIP_DISTANCE3_EXT = 0x3003; |
| 51 |
const GLenum CLIP_DISTANCE4_EXT = 0x3004; |
| 52 |
const GLenum CLIP_DISTANCE5_EXT = 0x3005; |
| 53 |
const GLenum CLIP_DISTANCE6_EXT = 0x3006; |
| 54 |
const GLenum CLIP_DISTANCE7_EXT = 0x3007; |
| 55 |
}; |
| 56 |
</idl> |
| 57 |
|
| 58 |
<samplecode xml:space="preserve"> |
| 59 |
<pre> |
| 60 |
#extension GL_EXT_clip_cull_distance : enable |
| 61 |
|
| 62 |
// Vertex shader |
| 63 |
out highp float gl_ClipDistance[2]; |
| 64 |
out highp float gl_CullDistance[2]; |
| 65 |
|
| 66 |
void main(){ |
| 67 |
// Compute the clip and cull distances for this vertex |
| 68 |
gl_ClipDistance[0] = ...; |
| 69 |
gl_CullDistance[0] = ...; |
| 70 |
gl_ClipDistance[1] = ...; |
| 71 |
gl_CullDistance[1] = ...; |
| 72 |
} |
| 73 |
</pre> |
| 74 |
</samplecode> |
| 75 |
|
| 76 |
<history> |
| 77 |
<revision date="2016/08/22"> |
| 78 |
<change>Initial revision.</change> |
| 79 |
</revision> |
| 80 |
</history> |
| 81 |
</proposal> |