attribute highp float distance, pitch, yaw;
attribute highp float reflectivity;

uniform highp float dis_unit;

uniform mat4 mvp;

varying highp float intensity;

void main(void)
{
    const highp float angle_factor = 2 * 3.1415926535897932384626433832795 / 36000.0;
    highp float dist = distance * dis_unit;
    highp float phi = pitch * angle_factor;
    highp float z = dist * sin(phi);
    highp float r = dist * cos(phi);
    highp float theta = yaw * angle_factor;
    highp float x = r * sin(theta);
    highp float y = r * cos(theta);
    
    gl_Position = mvp * vec4(x,y,z, 1.0);
    intensity = reflectivity / 256.0;
}