9glup_in
vec4 tex_coord_in;
10glup_in highp
float vertex_id_in;
12glup_flat glup_out
vec4 color;
13glup_flat glup_out
vec4 tex_coord;
14glup_flat glup_out
vec3 center_world_space;
15glup_flat glup_out
float radius;
16glup_flat glup_out glup_id primitive_id;
21 if(glupIsEnabled(GLUP_PICKING)) {
23 primitive_id = float(
int(vertex_id_in + 0.5)) + 0.5;
25 primitive_id = int(vertex_id_in + 0.5);
29 if(glupIsEnabled(GLUP_VERTEX_COLORS)) {
33 if(glupIsEnabled(GLUP_TEXTURING)) {
34 if(glupIsEnabled(GLUP_INDIRECT_TEXTURING)) {
35 tex_coord = tex_coord_in;
37 tex_coord = GLUP_VS.texture_matrix * tex_coord_in;
43 gl_PointSize = GLUP_VS.point_size;
44 gl_Position = GLUP_VS.modelviewprojection_matrix*vertex_in;
46 center_world_space = vertex_in.xyz / vertex_in.w;
48 vec4 P1 = GLUP_VS.inverse_modelviewprojection_matrix*
vec4(
51 vec4 P2 = GLUP_VS.inverse_modelviewprojection_matrix*
vec4(
52 GLUP_VS.point_size/GLUP_VS.viewport[2],0.0,0.0,1.0
54 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.