John Kessenich | 700bdeb | 2017-10-04 13:27:43 -0600 | [diff] [blame] | 1 | struct Nested { float y; Texture2D texNested; };
|
| 2 | struct A { Nested n; float x; };
|
| 3 | struct B { Nested n; Texture2D tex; };
|
| 4 |
|
| 5 | Texture2D someTex;
|
| 6 |
|
| 7 | float4 main(float4 vpos : VPOS) : COLOR0
|
| 8 | {
|
| 9 | A a1, a2;
|
| 10 | B b;
|
| 11 |
|
| 12 | // Assignment of nested structs to nested structs
|
| 13 | a1.n = a2.n;
|
| 14 | b .n = a1.n;
|
| 15 |
|
| 16 | // Assignment of nested struct to standalone
|
| 17 | Nested n = b.n;
|
| 18 |
|
| 19 | // Assignment to nestested struct members
|
| 20 | a2.n.texNested = someTex;
|
| 21 | a1.n.y = 1.0;
|
| 22 |
|
| 23 | return float4(0,0,0,0);
|
| 24 | }
|