John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 1 | #version 150 core
|
| 2 |
|
| 3 | layout(triangles_adjacency) in;
|
| 4 | layout(max_vertices = 30) out;
|
| 5 | layout(stream = 3, triangle_strip) out;
|
| 6 |
|
| 7 | in fromVertex {
|
| 8 | in vec3 color;
|
| 9 | } fromV[];
|
| 10 |
|
| 11 | out toFragment {
|
| 12 | out vec3 color;
|
| 13 | } toF;
|
| 14 |
|
| 15 | out fromVertex {
|
| 16 | vec3 color;
|
| 17 | };
|
| 18 |
|
| 19 | void main()
|
| 20 | {
|
| 21 | color = fromV[0].color;
|
| 22 | //?? gl_ClipDistance[3] = gl_in[1].gl_ClipDistance[2];
|
| 23 | gl_Position = gl_in[0].gl_Position;
|
| 24 | gl_PointSize = gl_in[3].gl_PointSize;
|
| 25 | gl_PrimitiveID = gl_PrimitiveIDIn;
|
| 26 | gl_Layer = 2;
|
| 27 |
|
| 28 | EmitVertex();
|
| 29 |
|
| 30 | color = 2 * fromV[0].color;
|
| 31 | gl_Position = 2.0 * gl_in[0].gl_Position;
|
| 32 | gl_PointSize = 2.0 * gl_in[3].gl_PointSize;
|
| 33 | gl_PrimitiveID = gl_PrimitiveIDIn + 1;
|
| 34 | gl_Layer = 3;
|
| 35 |
|
| 36 | EmitVertex();
|
| 37 |
|
| 38 | EndPrimitive();
|
| 39 | }
|