1varying vec4 varColor; 2 3void main() { 4 float dist = ATTRIB_position.y * UNI_scaleSize; 5 float angle = ATTRIB_position.x; 6 7 float x = dist * sin(angle); 8 float y = dist * cos(angle) * 0.8; 9 float p = dist * 7.5; 10 float s = cos(p); 11 float t = sin(p); 12 vec4 pos; 13 pos.x = t*x + s*y; 14 pos.y = s*x - t*y; 15 pos.z = ATTRIB_position.z; 16 pos.w = 1.0; 17 18 pos.y = pos.y * 0.5; 19 gl_Position = UNI_MVP * pos; 20 varColor = vec4(1.0, 1.0, 1.0, 0.5); 21 float pointSize = 1.0; 22 23 gl_PointSize = pointSize; 24}