mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2024-12-02 00:32:24 +08:00
27 lines
442 B
GLSL
27 lines
442 B
GLSL
#version 430
|
|
|
|
# define M_PI 3.14159265358979323846
|
|
|
|
layout(points) in;
|
|
layout(line_strip, max_vertices = 7) out;
|
|
|
|
layout(std140, binding = 0) uniform buf {
|
|
float radius;
|
|
};
|
|
|
|
void main(void)
|
|
{
|
|
|
|
for(int i=0;i<7;++i)
|
|
{
|
|
float theta = float(i) / 6.0f * 2.0 * M_PI;
|
|
|
|
gl_Position = gl_in[0].gl_Position;
|
|
gl_Position.xy += radius * vec2(cos(theta), sin(theta));
|
|
|
|
EmitVertex();
|
|
}
|
|
EndPrimitive();
|
|
|
|
}
|