LoopDawg | 5e5b12e | 2017-08-28 14:02:19 -0600 | [diff] [blame] | 1 | struct S { |
| 2 | float4 pos : SV_Position; |
| 3 | float2 clip0 : SV_ClipDistance0; // clip0 and clip1 form an array of float[4] externally. |
| 4 | float2 clip1 : SV_ClipDistance1; |
| 5 | }; |
| 6 | |
| 7 | [maxvertexcount(3)] |
| 8 | void main(triangle in float4 pos[3] : SV_Position, |
| 9 | triangle in uint VertexID[3] : VertexID, |
| 10 | inout LineStream<S> OutputStream, |
| 11 | triangle in float4 clip[3] : SV_ClipDistance) // externally: an array 3 of array 4 (not vec4!) of float. |
| 12 | { |
| 13 | S s; |
| 14 | |
| 15 | s.pos = pos[0]; |
| 16 | s.clip0 = clip[0].xy; |
| 17 | s.clip1 = clip[0].zw; |
| 18 | |
| 19 | OutputStream.Append(s); |
| 20 | } |