mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-01 05:21:02 +00:00
5e1a80e016
Unfortunately, the maximum point size on Intel hardwar seems to be 1, so I can't tell if the colors are right. This is largely just a hacked version of GL's particle code.
19 lines
305 B
GLSL
19 lines
305 B
GLSL
uniform mat4 mvp_mat;
|
|
attribute float vcolor;
|
|
/** Vertex position.
|
|
|
|
x, y, z, c
|
|
|
|
c is the color of the point.
|
|
*/
|
|
attribute vec3 vertex;
|
|
|
|
varying float color;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
gl_Position = mvp_mat * vec4 (vertex, 1.0);
|
|
gl_PointSize = max (1, 32768.0 * abs (1.0 / gl_Position.z));
|
|
color = vcolor;
|
|
}
|