Add texture gather functions (and extension check) for GLSL 400 and GL_ARB_texture_gather.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23631 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
a65dc63d46
commit
21a8770f92
11 changed files with 301 additions and 36 deletions
|
|
@ -1,13 +1,24 @@
|
|||
#version 330 core
|
||||
#version 400 core
|
||||
|
||||
in vec2 c2D;
|
||||
flat in int i;
|
||||
out vec4 outp;
|
||||
uniform sampler2D arrayedSampler[5];
|
||||
uniform usampler2DRect samp2dr;
|
||||
uniform isampler2DArray isamp2DA;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 v;
|
||||
v = texture(arrayedSampler[i], c2D);
|
||||
outp.x = gl_ClipDistance[1];
|
||||
|
||||
ivec2 offsets[4];
|
||||
uvec4 uv4 = textureGatherOffsets(samp2dr, c2D, offsets, 2);
|
||||
vec4 v4 = textureGather(arrayedSampler[0], c2D);
|
||||
ivec4 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 3);
|
||||
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), i); // ERROR, last argument not const
|
||||
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 4); // ERROR, last argument out of range
|
||||
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 1+2);
|
||||
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(i));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue