File: hlsl.load.buffer.float.dx10.frag

package info (click to toggle)
glslang 16.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,084 kB
  • sloc: cpp: 90,714; yacc: 4,243; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (38 lines) | stat: -rw-r--r-- 674 bytes parent folder | download | duplicates (20)
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
37
38
uniform Buffer <float> g_tTexbfs_test : register(t0);

Buffer <float> g_tTexbfs;
Buffer <int>   g_tTexbis;
Buffer <uint>  g_tTexbus;

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

uniform int   c1;
uniform int2  c2;
uniform int3  c3;
uniform int4  c4;

uniform int   o1;
uniform int2  o2;
uniform int3  o3;
uniform int4  o4;

PS_OUTPUT main()
{
   PS_OUTPUT psout;

   // Buffer
   float r00 = g_tTexbfs.Load(c1);
   int   r01 = g_tTexbis.Load(c1);
   uint  r02 = g_tTexbus.Load(c1);

   // TODO: other types that can be put in sampler buffers, like float2x2, and float3.

   psout.Color = 1.0;
   psout.Depth = 1.0;

   return psout;
}