103
float worldScale = length( ( gl_ModelViewMatrix * vec4( 1.0, 1.0, 1.0, 0.0 ) ).xyz );
105
109
// worldScale now contains the scaling which is done by ModelView transformation (including the camera).
106
110
// With this, we can ensure that our offset, which is of unit-length, is scaled acccording to the camera zoom. The
107
111
// additional uniform u_tubeSize allows the user to scale the tubes.
108
112
// We clamp the value to ensure a minimum width of the quadstrip of 1px on screen:
110
114
#else // ZOOMABLE_ENABLED
111
115
// In this mode, the tubes should not be zoomed. Just use the user defined size here.
112
116
float worldScale = clamp( u_tubeSize, 1.0, 1000000.0 );