14 vec3 center_world_space;
20 if(glupIsEnabled(GLUP_VERTEX_COLORS)) {
21 VertexOut.color = color_in;
24 if(glupIsEnabled(GLUP_TEXTURING)) {
25 if(glupIsEnabled(GLUP_INDIRECT_TEXTURING)) {
26 VertexOut.tex_coord = tex_coord_in;
28 VertexOut.tex_coord = GLUP.texture_matrix * tex_coord_in;
34 gl_PointSize = GLUP.point_size;
35 gl_Position = GLUP.modelviewprojection_matrix*vertex_in;
37 VertexOut.center_world_space = vertex_in.xyz / vertex_in.w;
38 vec4 P1 = GLUP.inverse_modelviewprojection_matrix*
vec4(0.0, 0.0, 0.0, 1.0);
39 vec4 P2 = GLUP.inverse_modelviewprojection_matrix*
vec4(
40 GLUP.point_size/GLUP.viewport[2],0.0,0.0,1.0
42 VertexOut.radius =
length(P1.xyz/P1.w-P2.xyz/P2.w);
double length(vec3 v)
Computes the length of a vector.
vecng< 3, Numeric::float64 > vec3
Represents points and vectors in 3d.
vecng< 4, Numeric::float64 > vec4
Represents points and vectors in 4d.