1SamplerState g_sSamp : register(s0); 2 3Texture1DArray g_tTex1df4a : register(t1); 4 5uniform Texture1DArray <float4> g_tTex1df4 : register(t0); 6Texture1DArray <int4> g_tTex1di4a; 7Texture1DArray <uint4> g_tTex1du4a; 8 9Texture2DArray <float4> g_tTex2df4a; 10Texture2DArray <int4> g_tTex2di4a; 11Texture2DArray <uint4> g_tTex2du4a; 12 13TextureCubeArray <float4> g_tTexcdf4a; 14TextureCubeArray <int4> g_tTexcdi4a; 15TextureCubeArray <uint4> g_tTexcdu4a; 16 17struct PS_OUTPUT 18{ 19 float4 Color : SV_Target0; 20 float Depth : SV_Depth; 21}; 22 23PS_OUTPUT main() 24{ 25 PS_OUTPUT psout; 26 27 // No 1D gathers 28 29 float4 txval20 = g_tTex2df4a . Gather(g_sSamp, float3(0.1, 0.2, 0.3)); 30 int4 txval21 = g_tTex2di4a . Gather(g_sSamp, float3(0.3, 0.4, 0.5)); 31 uint4 txval22 = g_tTex2du4a . Gather(g_sSamp, float3(0.5, 0.6, 0.7)); 32 33 // no 3D gathers 34 35 float4 txval40 = g_tTexcdf4a . Gather(g_sSamp, float4(0.1, 0.2, 0.3, 0.4)); 36 int4 txval41 = g_tTexcdi4a . Gather(g_sSamp, float4(0.4, 0.5, 0.6, 0.7)); 37 uint4 txval42 = g_tTexcdu4a . Gather(g_sSamp, float4(0.7, 0.8, 0.9, 1.0)); 38 39 psout.Color = 1.0; 40 psout.Depth = 1.0; 41 42 return psout; 43} 44