• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Texture2D tex;
2
3struct Packed {
4  Texture2D     tex;
5  float3        pos[3];
6  float2        uv[2];
7  float         x;
8  int           n;
9};
10
11float4 main(float4 pos : POSITION) : SV_POSITION
12{
13  Packed packed;
14  packed.tex    = tex;
15  packed.pos[0] = float3(0, 0, 0);
16  packed.uv[0]  = float2(0, 1);
17  packed.x      = 1.0;
18  packed.n      = 3;
19
20  for (int i = 0; i < 1; ++i) {
21    packed.pos[i].xy += packed.uv[i];
22  }
23
24  Packed packed2 = packed;
25
26  return pos + float4(packed2.pos[0], 0);
27}