1SamplerState g_sSamp : register(s0); 2 3Texture2DMS <float4> g_tTex2dmsf4; 4Texture2DMS <int4> g_tTex2dmsi4; 5Texture2DMS <uint4> g_tTex2dmsu4; 6 7Texture2DMSArray <float4> g_tTex2dmsf4a; 8Texture2DMSArray <int4> g_tTex2dmsi4a; 9Texture2DMSArray <uint4> g_tTex2dmsu4a; 10 11struct PS_OUTPUT 12{ 13 float4 Color : SV_Target0; 14 float Depth : SV_Depth; 15}; 16 17uniform int c1; 18uniform int2 c2; 19uniform int3 c3; 20uniform int4 c4; 21 22int2 getOffset() 23{ 24 return int2(1, 1); 25} 26 27PS_OUTPUT main() 28{ 29 PS_OUTPUT psout; 30 31 // 2DMS, no offset 32 g_tTex2dmsf4.Load(c2, 3); 33 g_tTex2dmsi4.Load(c2, 3); 34 g_tTex2dmsu4.Load(c2, 3); 35 36 // 2DMS, offset 37 g_tTex2dmsf4.Load(c2, 3, getOffset()); 38 g_tTex2dmsi4.Load(c2, 3, getOffset()); 39 g_tTex2dmsu4.Load(c2, 3, getOffset()); 40 41 // 2DMSArray, no offset 42 g_tTex2dmsf4a.Load(c3, 3); 43 g_tTex2dmsi4a.Load(c3, 3); 44 g_tTex2dmsu4a.Load(c3, 3); 45 46 // 2DMSArray, offset 47 g_tTex2dmsf4a.Load(c3, 3, getOffset()); 48 g_tTex2dmsi4a.Load(c3, 3, getOffset()); 49 g_tTex2dmsu4a.Load(c3, 3, getOffset()); 50 51 psout.Color = 1.0; 52 psout.Depth = 1.0; 53 54 return psout; 55} 56 57