LoopDawg | 9249c70 | 2016-07-12 20:44:32 -0600 | [diff] [blame] | 1 | struct PS_OUTPUT |
| 2 | { |
| 3 | float4 Color : SV_Target0; |
| 4 | float Depth : SV_Depth; |
| 5 | }; |
| 6 | |
| 7 | void MyFunc(in float x, out float y, inout float z) |
| 8 | { |
| 9 | y = x; |
| 10 | z = y; |
| 11 | x = -1; // no effect since x = in param |
| 12 | } |
| 13 | |
John Kessenich | b50fd17 | 2016-10-16 12:12:11 -0600 | [diff] [blame] | 14 | PS_OUTPUT main(noperspective in float4 inpos : SV_Position, out int sampleMask : SV_Coverage) |
LoopDawg | 9249c70 | 2016-07-12 20:44:32 -0600 | [diff] [blame] | 15 | { |
| 16 | PS_OUTPUT psout; |
| 17 | |
| 18 | float x = 7, y, z = 3; |
| 19 | MyFunc(x, y, z); |
| 20 | |
| 21 | psout.Color = float4(x, y, z, 1); |
| 22 | psout.Depth = inpos.w; |
| 23 | |
| 24 | return psout; |
| 25 | } |