// simple vertex shader
+attribute float attrib1;
+attribute float attrib2;
+attribute float attrib3;
+
+attribute float clamp;
attribute float minSize;
attribute float maxSize;
-attribute float clamp;
+attribute float magnification;
float3 ComputePointSize( float3 inColor )
{
+ float a1 = attrib1;
+ float a2 = attrib2;
+ float a3 = attrib3;
+
int r = inColor.x * 255;
int g = inColor.y * 255;
int b = inColor.z * 255;
if ( b < min ) min = b;
int delta = max-min;
- if( whatmax == 0 )
+ if( delta == 0 )
+ {
+ h = 0;
+ }
+ else if( whatmax == 0 )
{
if ( g >= b )
h = (120*(g-b)+delta)/(2*delta);
h = 180 + (120*(r-g+delta)+delta)/(2*delta);
}
- minSize = 15.0;
- maxSize = 40.0;
-
+ //minSize = 15.0;
+ //maxSize = 40.0;
float size = minSize + ( maxSize - minSize ) * ( 1 - h / 256.0f );
return size;
float size = ComputePointSize( gl_Color );
- clamp = 100.0;
- gl_PointSize = min( size * gl_ProjectionMatrix[0].x, clamp );
-
+ //clamp = 100.0;
+ gl_PointSize = min( magnification * size * gl_ProjectionMatrix[0].x, clamp );
}