1 SamplerState g_sSamp : register(s0);
2 uniform sampler2D g_sSamp2d
12 Texture1D g_tTex1df4a : register(t1);
14 uniform Texture1D <float4> g_tTex1df4 : register(t0);
15 Texture1D <int4> g_tTex1di4;
16 Texture1D <uint4> g_tTex1du4;
18 Texture2D <float4> g_tTex2df4;
19 Texture2D <int4> g_tTex2di4;
20 Texture2D <uint4> g_tTex2du4;
22 Texture3D <float4> g_tTex3df4;
23 Texture3D <int4> g_tTex3di4;
24 Texture3D <uint4> g_tTex3du4;
26 TextureCube <float4> g_tTexcdf4;
27 TextureCube <int4> g_tTexcdi4;
28 TextureCube <uint4> g_tTexcdu4;
32 int Sample; // in HLSL, method names are valid struct members.
33 int CalculateLevelOfDetail; // ...
34 int CalculateLevelOfDetailUnclamped; // ...
36 int GetDimensions; // ...
37 int GetSamplePosition; // ...
39 int SampleBias; // ...
41 int SampleCmpLevelZero; // ...
42 int SampleGrad; // ...
43 int SampleLevel; // ...
48 float4 Color : SV_Target0;
49 float Depth : SV_Depth;
57 mtest.CalculateLevelOfDetail = 1; // in HLSL, method names are valid struct members.
58 mtest.CalculateLevelOfDetailUnclamped = 1; // ...
59 mtest.Gather = 1; // ...
60 mtest.GetDimensions = 1; // ...
61 mtest.GetSamplePosition = 1; // ...
62 mtest.Load = 1; // ...
63 mtest.Sample = 1; // ...
64 mtest.SampleBias = 1; // ...
65 mtest.SampleCmp = 1; // ...
66 mtest.SampleCmpLevelZero = 1; // ...
67 mtest.SampleGrad = 1; // ...
68 mtest.SampleLevel = 1; // ...
70 float4 txval10 = g_tTex1df4 . Sample(g_sSamp, 0.1);
71 int4 txval11 = g_tTex1di4 . Sample(g_sSamp, 0.2);
72 uint4 txval12 = g_tTex1du4 . Sample(g_sSamp, 0.3);
74 float4 txval20 = g_tTex2df4 . Sample(g_sSamp, float2(0.1, 0.2));
75 int4 txval21 = g_tTex2di4 . Sample(g_sSamp, float2(0.3, 0.4));
76 uint4 txval22 = g_tTex2du4 . Sample(g_sSamp, float2(0.5, 0.6));
78 float4 txval30 = g_tTex3df4 . Sample(g_sSamp, float3(0.1, 0.2, 0.3));
79 int4 txval31 = g_tTex3di4 . Sample(g_sSamp, float3(0.4, 0.5, 0.6));
80 uint4 txval32 = g_tTex3du4 . Sample(g_sSamp, float3(0.7, 0.8, 0.9));
82 float4 txval40 = g_tTexcdf4 . Sample(g_sSamp, float3(0.1, 0.2, 0.3));
83 int4 txval41 = g_tTexcdi4 . Sample(g_sSamp, float3(0.4, 0.5, 0.6));
84 uint4 txval42 = g_tTexcdu4 . Sample(g_sSamp, float3(0.7, 0.8, 0.9));