quakeforge/libs/video/renderer/glsl/quakepnt.vert
2012-01-04 18:47:03 +09:00

18 lines
287 B
GLSL

uniform mat4 mvp_mat;
/** Vertex position.
x, y, z, c
c is the color of the point.
*/
attribute vec4 vertex;
varying float color;
void
main (void)
{
gl_Position = mvp_mat * vec4 (vertex.xyz, 1.0);
gl_PointSize = max (1, 32768.0 * abs (1.0 / gl_Position.z));
color = vertex.w;
}