You may also want to look at vtkShaderProperty which is on Actor. It supports all sorts of shader manipulation and is already tied to the actor and honored by the mapper. Note that OpenGLPolyDataMapper uses multiple shader programs when rendering (one for lines, another for surfaces, another for edges, and they can be changed by picking/opacity/etc so they tend to be changing based on user input (if the user has that level of control).
1 Like