Skip to content

Fix shader crash in Multi Volume Rendering without GradientTF

Fix: #18465 (closed)

When using OpenGLGPUVolumeRayCastMapper with a MultiVolume, not specifying a gradient opacity TF produced an error in the composed shader (no argument would be given to functions which expected one), and nothing was rendered, although this TF is supposed to be optional.

This commit fixes this by adding tests during the declarations of those functions inside the shader, and by changing their signatures as needed. Therefore, when no gradient opacity TF is given, no argument is expected and none is given. When some volumes have a gradient TF and some others don't, the multivolume is not rendered and a warning message is displayed.

Edited by Gaspard Thevenon

Merge request reports

Loading