Add support for ARB_sample_shading

Version : >= 130

Extension Name: ARB_sample_shading

Builtin-variables:
"gl_SampleID"
"gl_SamplePosition"
"gl_SampleMask"
"gl_NumSamples"

Reference:
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_sample_shading.txt
This commit is contained in:
Chow
2019-11-26 16:18:52 +08:00
parent bd97b6f9f2
commit 78b1180466
5 changed files with 270 additions and 236 deletions

View File

@@ -62,12 +62,14 @@ void bar2()
b3 < b3; // ERROR
uv3 > uv3; // ERROR
uvec2(2, 3) >= uvec2(3,3); // ERROR
int samples = gl_NumSamples; // ERROR
int(bl4) <= int(bl4); // true
int(bl4.x) > int(bl4.y); // false
}
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_texture_rectangle : enable
#extension GL_ARB_sample_shading : enable
uniform sampler2D samp2D;
uniform sampler2DShadow samp2DS;
@@ -83,6 +85,7 @@ void bar23()
s = textureGatherOffset(samp2DA, vec3(0.3), ivec2(1));
s = textureGatherOffset(samp2DS, vec2(0.3), 1.3, ivec2(1)); // ERROR
s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1), 2); // ERROR
int samples = gl_NumSamples;
}
#extension GL_ARB_gpu_shader5 : enable