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