Skip to content

Fix rendering edges as tubes without light

Rendering lines as tubes with the vtkOpenGLPolyDataMapper without lighting enabled was causing issues in the fragment shader compilation. This fixes it by adding an additional check. The feature is now disabled if no lights are present or if lighting is disabled through vtkProperty. Rendering lines as tubes relies on lights to take effect since tubes are simulated with lighting and normals (when rendering both surface and edges).

TestRenderLinesAsTubes

Technical details: this->PrimitiveInfo[this->LastBoundBO].LastLightComplexity > 0 seems to be the way to go for testing if lights are enabled in the scene. Checking if the renderer has lights does not cover all cases since lighting is also controlled by vtkProperty objects.

Backport: paraview/release

Edited by Thomas Galland

Merge request reports