!!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;
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;