Skip to content

Fix vtkMapper color texture map generation

Boris Basic requested to merge borisb/vtk:mapper-color-texture-fix into master

This fixes the color texture generation when InterpolateScalarBeforeMapping is on and above and below range colors are used. The previous algorithm could lead the 'last' non special color being picked from the lookup table to be replaced by the above range color. Now, each color is picked in the middle of its respective sub-boundaries to ensure no problem occurs, like illustrated below:

+---+---+---+---+---+---+---+---+---+---+---+---+
+   |   |   |   |   |   |   |   |   |   |   |   +
+---+---+---+---+---+---+---+---+---+---+---+---+
  ↑   ↑   ↑   ↑   ↑   ↑   ↑   ↑   ↑   ↑   ↑   ↑

This fixes issue #17045 (closed)

@cory-quammen Could you review?

Merge request reports