2 #extension GL_ARB_sparse_texture2: enable
\r
4 uniform sampler2D s2D;
\r
5 uniform isampler2D is2D;
\r
6 uniform usampler2D us2D;
\r
8 layout(rgba32f) uniform image2D i2D;
\r
9 layout(rgba32i) uniform iimage2DMS ii2DMS;
\r
10 layout(rgba32ui) uniform uimage3D ui3D;
\r
19 in flat ivec2 offsets[4];
\r
26 vec4 texel = vec4(0.0);
\r
27 ivec4 itexel = ivec4(0);
\r
28 uvec4 utexel = uvec4(0);
\r
30 resident |= sparseTextureARB(s2D, c2, texel);
\r
31 resident |= sparseTextureARB(is2D, c2, texel);
\r
32 resident |= sparseTextureARB(us2D, c2, texel);
\r
34 resident |= sparseTextureLodARB( s2D, c2, 2.0, texel);
\r
35 resident |= sparseTextureLodARB(is2D, c2, 2.0, texel);
\r
36 resident |= sparseTextureLodARB(us2D, c2, 2.0, texel);
\r
38 resident |= sparseTexelFetchARB( s2D, ivec2(c2), 2, texel);
\r
39 resident |= sparseTexelFetchARB(is2D, ivec2(c2), 2, texel);
\r
40 resident |= sparseTexelFetchARB(us2D, ivec2(c2), 2, texel);
\r
42 resident |= sparseImageLoadARB(i2D, ic2, texel);
\r
43 resident |= sparseImageLoadARB(ii2DMS, ic2, 3, texel);
\r
44 resident |= sparseImageLoadARB(ui3D, ic3, utexel);
\r
46 outColor = sparseTexelsResidentARB(resident) ? texel : vec4(itexel) + vec4(utexel);
\r