1SamplerState g_sSamp : register(s0); 2 3Texture1D g_tTex1df4a : register(t1); 4 5uniform Texture1D <float4> g_tTex1df4 : register(t0); 6Texture1D <int4> g_tTex1di4; 7Texture1D <uint4> g_tTex1du4; 8 9Texture2D <float4> g_tTex2df4; 10Texture2D <int4> g_tTex2di4; 11Texture2D <uint4> g_tTex2du4; 12 13Texture3D <float4> g_tTex3df4; 14Texture3D <int4> g_tTex3di4; 15Texture3D <uint4> g_tTex3du4; 16 17TextureCube <float4> g_tTexcdf4; 18TextureCube <int4> g_tTexcdi4; 19TextureCube <uint4> g_tTexcdu4; 20 21struct PS_OUTPUT 22{ 23 float4 Color : SV_Target0; 24 float Depth : SV_Depth; 25}; 26 27PS_OUTPUT main() 28{ 29 PS_OUTPUT psout; 30 31 float4 txval10 = g_tTex1df4 . SampleBias(g_sSamp, 0.1, 0.5, 1); 32 int4 txval11 = g_tTex1di4 . SampleBias(g_sSamp, 0.2, 0.5, 1); 33 uint4 txval12 = g_tTex1du4 . SampleBias(g_sSamp, 0.3, 0.5, 1); 34 35 float4 txval20 = g_tTex2df4 . SampleBias(g_sSamp, float2(0.1, 0.2), 0.5, int2(1,0)); 36 int4 txval21 = g_tTex2di4 . SampleBias(g_sSamp, float2(0.3, 0.4), 0.5, int2(1,1)); 37 uint4 txval22 = g_tTex2du4 . SampleBias(g_sSamp, float2(0.5, 0.6), 0.5, int2(1,-1)); 38 39 float4 txval30 = g_tTex3df4 . SampleBias(g_sSamp, float3(0.1, 0.2, 0.3), 0.5, int3(1,0,1)); 40 int4 txval31 = g_tTex3di4 . SampleBias(g_sSamp, float3(0.4, 0.5, 0.6), 0.5, int3(1,1,1)); 41 uint4 txval32 = g_tTex3du4 . SampleBias(g_sSamp, float3(0.7, 0.8, 0.9), 0.5, int3(1,0,-1)); 42 43 // There are no offset forms of cube textures, so we do not test them. 44 45 psout.Color = 1.0; 46 psout.Depth = 1.0; 47 48 return psout; 49} 50