12345678910111213141516171819202122232425262728293031 |
- #version 430
- layout (points) in;
- layout (triangle_strip, max_vertices = 3) out;
- uniform mat4 proj;
- uniform mat4 view;
- in float varFade[];
- in vec3 varOffsetA[];
- in vec3 varOffsetB[];
- out float varFadeG;
- void main(void) {
- vec4 base = gl_in[0].gl_Position;
- gl_Position = proj * view * vec4(base.xyz, 1.0);
- varFadeG = varFade[0];
- EmitVertex();
- gl_Position = proj * view * vec4(base.xyz + varOffsetA[0], 1.0);
- varFadeG = varFade[0];
- EmitVertex();
- gl_Position = proj * view * vec4(base.xyz + varOffsetB[0], 1.0);
- varFadeG = varFade[0];
- EmitVertex();
- EndPrimitive();
- }
|