You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
478 B
20 lines
478 B
10 years ago
|
layout (points) in;
|
||
|
layout (line_strip) out;
|
||
|
layout (max_vertices = 11) out;
|
||
|
|
||
|
uniform mat4 g_WorldViewProjectionMatrix;
|
||
|
const float PI = 3.1415926;
|
||
|
void main(){
|
||
|
for (int i = 0; i <= 10; i++) {
|
||
|
|
||
|
float ang = PI * 2.0 / 10.0 * i;
|
||
|
vec4 offset = vec4(cos(ang) * 5, -sin(ang) * 5, 0.0, 0.0);
|
||
|
gl_Position = g_WorldViewProjectionMatrix*vec4(gl_in[0].gl_Position.xyz + offset.xyz,1.0);
|
||
|
|
||
|
EmitVertex();
|
||
|
}
|
||
|
|
||
|
EndPrimitive();
|
||
|
}
|
||
|
|