File: hlsl.flattenSubset2.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 (24 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
struct Nested { float y; Texture2D texNested; };
struct A { Nested n; float x; };
struct B { Nested n; Texture2D tex; };

Texture2D someTex;

float4 main(float4 vpos : VPOS) : COLOR0
{
    A a1, a2;
    B b;

    // Assignment of nested structs to nested structs
    a1.n = a2.n;
    b .n = a1.n;

    // Assignment of nested struct to standalone
    Nested n = b.n; 

    // Assignment to nestested struct members
    a2.n.texNested = someTex;
    a1.n.y = 1.0;

    return float4(0,0,0,0);
}