blob: 92186ae8d6b5e9510b11a3434d20b0a27c4f000f [file] [log] [blame]
John Kessenich39374da2015-05-15 21:32:46 +00001#version 420 core
2
3layout(triangles) in;
4
5in gl_PerVertex {
6 float gl_PointSize;
7} gl_in[];
8
9out gl_PerVertex {
10 float gl_PointSize;
11};
12
13layout(line_strip) out;
14layout(max_vertices = 127) out;
15layout(invocations = 4) in;
16
17uniform sampler2D s2D;
18in vec2 coord[];
John Kessenich6c292d32016-02-15 20:58:50 -070019
20int i;
John Kessenich39374da2015-05-15 21:32:46 +000021
22void main()
23{
24 float p = gl_in[1].gl_PointSize;
25 gl_PointSize = p;
26 gl_ViewportIndex = 7;
27
28 EmitStreamVertex(1);
29 EndStreamPrimitive(0);
30 EmitVertex();
31 EndPrimitive();
32 int id = gl_InvocationID;
33
34 const ivec2 offsets[5] =
35 {
36 ivec2(0,1),
37 ivec2(1,-2),
38 ivec2(0,3),
39 ivec2(-3,0),
40 ivec2(2,1)
41 };
42 vec4 v = textureGatherOffset(s2D, coord[0], offsets[i].xy);
43}