• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1SamplerComparisonState  g_sSampCmp : register(s0);
2
3uniform Texture1DArray <float4> g_tTex1df4a : register(t0);
4Texture1DArray <int4>   g_tTex1di4a;
5Texture1DArray <uint4>  g_tTex1du4a;
6
7Texture2DArray <float4> g_tTex2df4a;
8Texture2DArray <int4>   g_tTex2di4a;
9Texture2DArray <uint4>  g_tTex2du4a;
10
11TextureCubeArray <float4> g_tTexcdf4a;
12TextureCubeArray <int4>   g_tTexcdi4a;
13TextureCubeArray <uint4>  g_tTexcdu4a;
14
15struct PS_OUTPUT
16{
17    float4 Color : SV_Target0;
18    float  Depth : SV_Depth;
19};
20
21uniform float  c1;
22uniform float2 c2;
23uniform float3 c3;
24uniform float4 c4;
25
26PS_OUTPUT main()
27{
28   PS_OUTPUT psout;
29
30   // no 1D gathers
31
32   float4 txval80 = g_tTex2df4a . GatherCmp(g_sSampCmp, c3, .75);
33   int4   txval81 = g_tTex2di4a . GatherCmp(g_sSampCmp, c3, .75);
34   uint4  txval82 = g_tTex2du4a . GatherCmp(g_sSampCmp, c3, .75);
35
36   float4 txval00 = g_tTex2df4a . GatherCmpRed(g_sSampCmp, c3, .75);
37   int4   txval01 = g_tTex2di4a . GatherCmpRed(g_sSampCmp, c3, .75);
38   uint4  txval02 = g_tTex2du4a . GatherCmpRed(g_sSampCmp, c3, .75);
39
40   float4 txval10 = g_tTex2df4a . GatherCmpGreen(g_sSampCmp, c3, .75);
41   int4   txval11 = g_tTex2di4a . GatherCmpGreen(g_sSampCmp, c3, .75);
42   uint4  txval12 = g_tTex2du4a . GatherCmpGreen(g_sSampCmp, c3, .75);
43
44   float4 txval20 = g_tTex2df4a . GatherCmpBlue(g_sSampCmp, c3, .75);
45   int4   txval21 = g_tTex2di4a . GatherCmpBlue(g_sSampCmp, c3, .75);
46   uint4  txval22 = g_tTex2du4a . GatherCmpBlue(g_sSampCmp, c3, .75);
47
48   float4 txval30 = g_tTex2df4a . GatherCmpAlpha(g_sSampCmp, c3, .75);
49   int4   txval31 = g_tTex2di4a . GatherCmpAlpha(g_sSampCmp, c3, .75);
50   uint4  txval32 = g_tTex2du4a . GatherCmpAlpha(g_sSampCmp, c3, .75);
51
52   // no 3D gathers
53
54   float4 txval40 = g_tTexcdf4a . GatherCmpRed(g_sSampCmp, c4, .75);
55   int4   txval41 = g_tTexcdi4a . GatherCmpRed(g_sSampCmp, c4, .75);
56   uint4  txval42 = g_tTexcdu4a . GatherCmpRed(g_sSampCmp, c4, .75);
57
58   float4 txval50 = g_tTexcdf4a . GatherCmpGreen(g_sSampCmp, c4, .75);
59   int4   txval51 = g_tTexcdi4a . GatherCmpGreen(g_sSampCmp, c4, .75);
60   uint4  txval52 = g_tTexcdu4a . GatherCmpGreen(g_sSampCmp, c4, .75);
61
62   float4 txval60 = g_tTexcdf4a . GatherCmpBlue(g_sSampCmp, c4, .75);
63   int4   txval61 = g_tTexcdi4a . GatherCmpBlue(g_sSampCmp, c4, .75);
64   uint4  txval62 = g_tTexcdu4a . GatherCmpBlue(g_sSampCmp, c4, .75);
65
66   float4 txval70 = g_tTexcdf4a . GatherCmpAlpha(g_sSampCmp, c4, .75);
67   int4   txval71 = g_tTexcdi4a . GatherCmpAlpha(g_sSampCmp, c4, .75);
68   uint4  txval72 = g_tTexcdu4a . GatherCmpAlpha(g_sSampCmp, c4, .75);
69
70   psout.Color = 1.0;
71   psout.Depth = 1.0;
72
73   return psout;
74}
75