]> SALOME platform Git repositories - modules/visu.git/blob - resources/Vertex_Program_ARB.txt
Salome HOME
Fix for the bug IPAL22864: "Salome show fatal error message, when try load VISU"
[modules/visu.git] / resources / Vertex_Program_ARB.txt
1 attribute float mode;
2 attribute float clampSize;
3 attribute float geomSize;
4 attribute float minSize;
5 attribute float maxSize;
6 attribute float magnification;
7
8 void main()
9 {
10   gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
11
12   gl_FrontColor = gl_Color;
13
14   float size;
15   if( mode == 0 )   // Results
16     size = minSize + ( maxSize - minSize ) * ( 1 - gl_Color.w / 241.0f );
17   else              // Geometry and Uniform colored outside cursor
18     size = geomSize;
19
20   gl_PointSize = clamp( magnification * size * gl_ProjectionMatrix[1].y, 2.0, clampSize );
21 }