I’m trying to make a shader which draws a line in the viewport. It’s fed points and it draws straight line segments between the points. Not surprisingly, that works no problem! Now I want to feed the shader two lists. The same set of points. And a new list which is either 0s or 1s. If the value is 0 I want to draw with one color. If the value is 1 I want to draw with the other color. Should be simple. But it doesn’t work and I’m not sure what I’m doing wrong. Right now it always draws with color 0.
I’ve attached a simple GH definition with the shader defined. If anyone can offer suggestions I’d appreciate it.
This is for CNC work. The traverses between toolpaths would be one color and the toolpaths themselves would be another color. In this trivial example there are 3 rectangles. Those should be one color. The lines between them another.
GhGLSample.gh (8.2 KB)