4 // require_extensions: GL_ARB_gpu_shader5
8 #extension GL_ARB_gpu_shader5: require
10 uniform sampler2D s2D;
11 uniform sampler2DArray s2DArray;
12 uniform sampler2DRect s2DRect;
14 uniform isampler2D is2D;
15 uniform isampler2DArray is2DArray;
16 uniform isampler2DRect is2DRect;
18 uniform usampler2D us2D;
19 uniform usampler2DArray us2DArray;
20 uniform usampler2DRect us2DRect;
22 uniform sampler2DShadow ss2D;
23 uniform sampler2DArrayShadow ss2DArray;
24 uniform sampler2DRectShadow ss2DRect;
26 const ivec2[] offsets = ivec2[](
33 const float refz = 0.5;
39 /* float samplers, no component select */
40 res += textureGatherOffsets(s2D, vec2(0), offsets);
41 res += textureGatherOffsets(s2DArray, vec3(0), offsets);
42 res += textureGatherOffsets(s2DRect, vec2(0), offsets);
44 /* float samplers, component select */
45 res += textureGatherOffsets(s2D, vec2(0), offsets, 0);
46 res += textureGatherOffsets(s2DArray, vec3(0), offsets, 1);
47 res += textureGatherOffsets(s2DRect, vec2(0), offsets, 2);
49 /* int samplers, no component select */
50 res += textureGatherOffsets(is2D, vec2(0), offsets);
51 res += textureGatherOffsets(is2DArray, vec3(0), offsets);
52 res += textureGatherOffsets(is2DRect, vec2(0), offsets);
54 /* int samplers, component select */
55 res += textureGatherOffsets(is2D, vec2(0), offsets, 0);
56 res += textureGatherOffsets(is2DArray, vec3(0), offsets, 1);
57 res += textureGatherOffsets(is2DRect, vec2(0), offsets, 2);
59 /* uint samplers, no component select */
60 res += textureGatherOffsets(us2D, vec2(0), offsets);
61 res += textureGatherOffsets(us2DArray, vec3(0), offsets);
62 res += textureGatherOffsets(us2DRect, vec2(0), offsets);
64 /* uint samplers, component select */
65 res += textureGatherOffsets(us2D, vec2(0), offsets, 0);
66 res += textureGatherOffsets(us2DArray, vec3(0), offsets, 1);
67 res += textureGatherOffsets(us2DRect, vec2(0), offsets, 2);
69 /* shadow samplers, no component select (none available) */
70 res += textureGatherOffsets(ss2D, vec2(0), refz, offsets);
71 res += textureGatherOffsets(ss2DArray, vec3(0), refz, offsets);
72 res += textureGatherOffsets(ss2DRect, vec2(0), refz, offsets);