]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
*** empty log message ***
authorouv <ouv@opencascade.com>
Mon, 5 Sep 2005 05:19:19 +0000 (05:19 +0000)
committerouv <ouv@opencascade.com>
Mon, 5 Sep 2005 05:19:19 +0000 (05:19 +0000)
resources/Vertex_Program_ARB.txt

index d017060b9c3e5debd31973db2dba618fca9adbae..89f2feb9bdec445cae8b0dd48b9d353535326772 100755 (executable)
@@ -1,23 +1,29 @@
 !!ARBvp1.0
 
 # Constant Parameters
-PARAM mvp[4]     = { state.matrix.mvp }; # modelview projection matrix
-PARAM constColor = program.env[0];       # constant color (defined by the application)
-PARAM constSize  = program.env[1];       # constant size
-
-# constColor.x == 1.0
-# constColor.y == 1.0
-# constColor.z == 1.0
-# constColor.w == 1.0
-
-# constSize.x  == 1.0
-# constSize.y  == 10.0
-# constSize.z  == 100.0
-# constSize.w  == 1000.0
+PARAM mvp[4]       = { state.matrix.mvp }; # modelview projection matrix
+PARAM constSize    = program.env[0];       # constant size
+PARAM constColor   = program.env[1];       # constant color (defined by the application)
+PARAM coefficient  = program.env[2];
+
+# constColor.x    == 1.0
+# constColor.y    == 1.0
+# constColor.z    == 1.0
+# constColor.w    == 1.0
+
+# constSize.x     == 50.0
+# constSize.y     == 1.0
+# constSize.z     == 1.0
+# constSize.w     == 1.0
+
+# coefficient.x   == 1.0
+# coefficient.y   == 10.0
+# coefficient.z   == 100.0
+# coefficient.w   == 1000.0
 
 # Per-vertex inputs
-ATTRIB inPosition = vertex.position;
-ATTRIB inColor    = vertex.color;
+ATTRIB inPosition  = vertex.position;
+ATTRIB inColor     = vertex.color;
 
 # Per-vertex outputs
 OUTPUT outPosition = result.position;
@@ -30,28 +36,19 @@ DP4 outPosition.z, mvp[2], inPosition;   # Transform the z component of the per-
 DP4 outPosition.w, mvp[3], inPosition;   # Transform the w component of the per-vertex position into clip-space
 
 # Color management
-
-TEMP color1;
-TEMP color2;
-
-#MOV color1, inColor.y;
-#DP4 color2, color1, color1;
-#MOV outColor, color1;
-
 MOV outColor, inColor;                   # Use the original per-vertex color specified
 #MOV outColor, constColor;                # Uncomment this to use the constant color stored at "program.env[0]"
 
 # Size management
-
 TEMP    size1;
 
 MOV     size1,     constSize;
 
-DP4     size1.x,   inColor,     inColor;
-MUL     size1.x,   size1.x,     constSize.y;
+#DP4     size1.x,   inColor,     inColor;
+#MUL     size1.x,   size1.x,     coefficient.y;
 
 #MUL     size1.x,   size1.x,     inColor.w;
-#MUL     size1.x,   size1.x,     constSize.y;
+#MUL     size1.x,   size1.x,     coefficient.y;
 
 MOV     outSize,   size1;