GLSL: Fix tessellation control shader bounding box support. (#1730)
Prior to this change, OES_primitive_bounding_box and EXT_primitive_bounding_box were both recognised as extensions, but only the name gl_BoundingBoxOES could be used. However the EXT version uses the name gl_BoundingBoxEXT instead. In addition, since GLES 3.2, the extension has been included in the core standard and the name gl_BoundingBox may be used instead. This change aims to make both extensions and the 3.2 core version all work.
This commit is contained in:
parent
bd0f5ad278
commit
e442a03897
5 changed files with 326 additions and 197 deletions
|
|
@ -128,6 +128,21 @@ void goodfoop()
|
|||
d = fma(d, d, d);
|
||||
}
|
||||
|
||||
void bbextBad()
|
||||
{
|
||||
gl_BoundingBoxEXT; // ERROR without GL_EXT_primitive_bounding_box
|
||||
gl_BoundingBox; // ERROR, version < 320
|
||||
}
|
||||
|
||||
#extension GL_EXT_primitive_bounding_box : enable
|
||||
|
||||
void bbext()
|
||||
{
|
||||
gl_BoundingBoxEXT[0] = vec4(0.0);
|
||||
gl_BoundingBoxEXT[1] = vec4(1.0);
|
||||
gl_BoundingBoxEXT[2] = vec4(2.0); // ERROR, overflow
|
||||
}
|
||||
|
||||
void bbBad()
|
||||
{
|
||||
gl_BoundingBoxOES; // ERROR without GL_OES_primitive_bounding_box
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue