2 #extension GL_ARB_sparse_texture2: enable
\r
4 uniform sampler2D s2D;
\r
5 uniform sampler3D s3D;
\r
6 uniform sampler2DShadow s2DShadow;
\r
7 uniform samplerCubeShadow sCubeShadow;
\r
8 uniform sampler2DArrayShadow s2DArrayShadow;
\r
9 uniform sampler2DRectShadow s2DRectShadow;
\r
10 uniform samplerCubeArrayShadow sCubeArrayShadow;
\r
11 uniform sampler2DMS s2DMS;
\r
13 uniform isamplerCube isCube;
\r
14 uniform isampler2DArray is2DArray;
\r
16 uniform usamplerCubeArray usCubeArray;
\r
17 uniform usampler2DRect us2DRect;
\r
19 layout(rgba32f) uniform image2D i2D;
\r
20 layout(rgba32i) uniform iimage3D ii3D;
\r
21 layout(rgba32f) uniform image2DMS i2DMS;
\r
35 vec4 texel = vec4(0.0);
\r
36 ivec4 itexel = ivec4(0);
\r
37 uvec4 utexel = uvec4(0);
\r
39 resident |= sparseTextureARB(s2D, c2, texel);
\r
40 resident |= sparseTextureARB(s3D, c3, texel, 2.0);
\r
41 resident |= sparseTextureARB(isCube, c3, itexel);
\r
42 resident |= sparseTextureARB(s2DShadow, c3, texel.x);
\r
43 resident |= sparseTextureARB(sCubeArrayShadow, c4, 1.0, texel.x);
\r
45 resident |= sparseTextureLodARB(s2D, c2, 2.0, texel);
\r
46 resident |= sparseTextureLodARB(usCubeArray, c4, 1.0, utexel);
\r
47 resident |= sparseTextureLodARB(s2DShadow, c3, 2.0, texel.y);
\r
49 resident |= sparseTextureOffsetARB(s3D, c3, ivec3(2), texel, 2.0);
\r
50 resident |= sparseTextureOffsetARB(us2DRect, c2, ivec2(3), utexel);
\r
51 resident |= sparseTextureOffsetARB(s2DArrayShadow, c4, ivec2(5), texel.z);
\r
53 resident |= sparseTexelFetchARB(s2D, ivec2(c2), 2, texel);
\r
54 resident |= sparseTexelFetchARB(us2DRect, ivec2(c2), utexel);
\r
55 resident |= sparseTexelFetchARB(s2DMS, ivec2(c2), 4, texel);
\r
57 resident |= sparseTexelFetchOffsetARB(s3D, ivec3(c3), 2, ivec3(4), texel);
\r
58 resident |= sparseTexelFetchOffsetARB(us2DRect, ivec2(c2), ivec2(3), utexel);
\r
60 resident |= sparseTextureLodOffsetARB(s2D, c2, 2.0, ivec2(5), texel);
\r
61 resident |= sparseTextureLodOffsetARB(is2DArray, c3, 2.0, ivec2(6), itexel);
\r
62 resident |= sparseTextureLodOffsetARB(s2DShadow, c3, 2.0, ivec2(7), texel.z);
\r
64 resident |= sparseTextureGradARB(s3D, c3, c3, c3, texel);
\r
65 resident |= sparseTextureGradARB(sCubeShadow, c4, c3, c3, texel.y);
\r
66 resident |= sparseTextureGradARB(usCubeArray, c4, c3, c3, utexel);
\r
68 resident |= sparseTextureGradOffsetARB(s2D, c2, c2, c2, ivec2(5), texel);
\r
69 resident |= sparseTextureGradOffsetARB(s2DRectShadow, c3, c2, c2, ivec2(6), texel.w);
\r
70 resident |= sparseTextureGradOffsetARB(is2DArray, c3, c2, c2, ivec2(2), itexel);
\r
72 resident |= sparseTextureGatherARB(s2D, c2, texel);
\r
73 resident |= sparseTextureGatherARB(is2DArray, c3, itexel, 2);
\r
74 resident |= sparseTextureGatherARB(s2DArrayShadow, c3, 2.0, texel);
\r
76 resident |= sparseTextureGatherOffsetARB(s2D, c2, ivec2(4), texel);
\r
77 resident |= sparseTextureGatherOffsetARB(is2DArray, c3, ivec2(5), itexel, 2);
\r
78 resident |= sparseTextureGatherOffsetARB(s2DRectShadow, c2, 2.0, ivec2(7), texel);
\r
80 const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));
\r
81 resident |= sparseTextureGatherOffsetsARB(s2D, c2, constOffsets, texel);
\r
82 resident |= sparseTextureGatherOffsetsARB(is2DArray, c3, constOffsets, itexel, 2);
\r
83 resident |= sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, constOffsets, texel);
\r
85 resident |= sparseImageLoadARB(i2D, ic2, texel);
\r
86 resident |= sparseImageLoadARB(ii3D, ic3, itexel);
\r
87 resident |= sparseImageLoadARB(i2DMS, ic2, 3, texel);
\r
89 outColor = sparseTexelsResidentARB(resident) ? texel : vec4(itexel) + vec4(utexel);
\r