mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-12 00:01:43 +00:00
76cb60461d
This looks fairly reasonable, but should probably be tweaked further to base the point size on resolution.
19 lines
304 B
GLSL
19 lines
304 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, 1024.0 * abs (1.0 / gl_Position.z));
|
|
color = vcolor;
|
|
}
|