• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2sampler            g_sam     : register(t0);
3sampler1D          g_sam1D   : register(t1);
4sampler2D          g_sam2D   : register(t2);
5sampler3D          g_sam3D	 : register(t3);
6samplerCube        g_samCube : register(t4);
7
8struct PS_OUTPUT
9{
10    float4 Color : SV_Target0;
11    float  Depth : SV_Depth;
12};
13
14PS_OUTPUT main()
15{
16   PS_OUTPUT psout;
17
18   float4 ColorOut = float4(0,0,0,0);
19
20   ColorOut += tex2D(   g_sam  ,   float2(0.4,0.3));
21   ColorOut += tex1D(   g_sam1D,   0.5);
22   ColorOut += tex2D(   g_sam2D,   float2(0.5,0.6));
23   ColorOut += tex3D(   g_sam3D,   float3(0.5,0.6,0.4));
24   ColorOut += texCUBE( g_samCube, float3(0.5,0.6,0.4));
25
26   ColorOut += tex2Dlod(   g_sam  ,   float4(0.4,0.3,0.0,0.0));
27   ColorOut += tex1Dlod(   g_sam1D,   float4(0.5,0.0,0.0,0.0));
28   ColorOut += tex2Dlod(   g_sam2D,   float4(0.5,0.6,0.0,0.0));
29   ColorOut += tex3Dlod(   g_sam3D,   float4(0.5,0.6,0.4,0.0));
30   ColorOut += texCUBElod( g_samCube, float4(0.5,0.6,0.4,0.0));
31
32   psout.Color = ColorOut / 10.0f;
33   psout.Depth = 1.0;
34
35   return psout;
36}
37