2012-01-04 09:47:03 +00:00
|
|
|
uniform mat4 mvp_mat;
|
2012-01-19 01:38:05 +00:00
|
|
|
attribute float vcolor;
|
2012-01-04 09:47:03 +00:00
|
|
|
/** Vertex position.
|
|
|
|
|
|
|
|
x, y, z, c
|
|
|
|
|
|
|
|
c is the color of the point.
|
|
|
|
*/
|
2012-01-19 01:38:05 +00:00
|
|
|
attribute vec3 vertex;
|
2012-01-04 09:47:03 +00:00
|
|
|
|
|
|
|
varying float color;
|
|
|
|
|
|
|
|
void
|
|
|
|
main (void)
|
|
|
|
{
|
2012-01-19 01:38:05 +00:00
|
|
|
gl_Position = mvp_mat * vec4 (vertex, 1.0);
|
2012-01-21 13:05:24 +00:00
|
|
|
gl_PointSize = max (1, 1024.0 * abs (1.0 / gl_Position.z));
|
2012-01-19 01:38:05 +00:00
|
|
|
color = vcolor;
|
2012-01-04 09:47:03 +00:00
|
|
|
}
|