summaryrefslogtreecommitdiff
path: root/tests/hlsl/structuredbuffer.hlsl
blob: d5ecf1238548b8e6473a6ca7855ce90e8df204ee (plain)
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

struct SepNormal {
  float x;
  float y;
  float z;
};

struct Rgb {
  float r[5];
  float g[5];
  float b[5];
};

struct Uv {
  float u;
  float v;
};

struct Data {
  float3      Position;
  SepNormal   Normal;
  Rgb         Colors[3];
  Uv          TexCoords;
  float       Scales[3];
  uint        Id;
};

StructuredBuffer<Data> MyData : register(t0);

float4 main() : SV_Target
{
  return float4(MyData[0].Position, 1);
}