1SamplerState g_sSamp : register(s0); 2 3Texture1DArray g_tTex1df4a : register(t1); 4 5uniform Texture1DArray <float4> g_tTex1df4 : register(t0); 6Texture1DArray <int4> g_tTex1di4; 7Texture1DArray <uint4> g_tTex1du4; 8 9Texture2DArray <float4> g_tTex2df4; 10Texture2DArray <int4> g_tTex2di4; 11Texture2DArray <uint4> g_tTex2du4; 12 13struct PS_OUTPUT 14{ 15 float4 Color : SV_Target0; 16 float Depth : SV_Depth; 17}; 18 19PS_OUTPUT main() 20{ 21 PS_OUTPUT psout; 22 23 // No 1D gathers 24 25 float4 txval20 = g_tTex2df4 . Gather(g_sSamp, float3(0.1, 0.2, 0.3), int2(1,0)); 26 int4 txval21 = g_tTex2di4 . Gather(g_sSamp, float3(0.3, 0.4, 0.4), int2(1,1)); 27 uint4 txval22 = g_tTex2du4 . Gather(g_sSamp, float3(0.5, 0.6, 0.7), int2(1,-1)); 28 29 // No 3D gathers 30 // No Cube offset gathers 31 32 psout.Color = 1.0; 33 psout.Depth = 1.0; 34 35 return psout; 36} 37