File: hlsl.sample.dx9.frag

package info (click to toggle)
glslang 16.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,712 kB
  • sloc: cpp: 92,305; yacc: 4,320; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (36 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

sampler            g_sam     : register(t0);
sampler1D          g_sam1D   : register(t1);
sampler2D          g_sam2D   : register(t2);
sampler3D          g_sam3D	 : register(t3);
samplerCUBE        g_samCube : register(t4);

struct PS_OUTPUT
{
    float4 Color : SV_Target0;
    float  Depth : SV_Depth;
};

PS_OUTPUT main()
{
   PS_OUTPUT psout;

   float4 ColorOut = float4(0,0,0,0);
   
   ColorOut += tex2D(   g_sam  ,   float2(0.4,0.3));
   ColorOut += tex1D(   g_sam1D,   0.5);
   ColorOut += tex2D(   g_sam2D,   float2(0.5,0.6));
   ColorOut += tex3D(   g_sam3D,   float3(0.5,0.6,0.4));
   ColorOut += texCUBE( g_samCube, float3(0.5,0.6,0.4));
   
   ColorOut += tex2Dlod(   g_sam  ,   float4(0.4,0.3,0.0,0.0));
   ColorOut += tex1Dlod(   g_sam1D,   float4(0.5,0.0,0.0,0.0));
   ColorOut += tex2Dlod(   g_sam2D,   float4(0.5,0.6,0.0,0.0));
   ColorOut += tex3Dlod(   g_sam3D,   float4(0.5,0.6,0.4,0.0));
   ColorOut += texCUBElod( g_samCube, float4(0.5,0.6,0.4,0.0));
  
   psout.Color = ColorOut / 10.0f;
   psout.Depth = 1.0;

   return psout;
}