SetAmbient no effect on multi component volume render.
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
If you are doing a single component volume render SetAmbient(0.9) of vtkVolumeProperty correctly adjust the ambient of that volume. However if the volume is 2 components SetAmbient(0, 0.9) SetAmbient(1, 0.9); has no effect. Looking at the code; the default values for lightAmbientColor in vtkEncodedGradientShader.cxx, line 324 are zero, and thus no ambient lighting effects. Work around is to add a light which defines the ambient color
vtkSmartPointer light = vtkSmartPointer::New(); light->SetAmbientColor(1, 1, 1);
(probably don't need SetAmbientColor)
Applies to both opengl2 and opengl modules.
If no lighting has been specified defaults should be 1 and not 0.
Volume is generated using vtkSmartVolumeMapper (fixed point ray cast because of 2 components). GPURenderDemo.cpp is working base code.