VTK blend color in wierd way with vtkassembly

When I update VTK to version 8.2.0, I encounter a specical bug that VTK will blend color with ‘vtkAssembly’ in wierd way comparing to behavior by vtkActor .

While blend color with vtkAssembly, it seems that VTK just add color by (r,g,b), thus white color appears offen.

In the following example, left is drawn by vtkActor , and right is added to scene by vtkAssembly
%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20191125222905

I reproduce bug with following simple code :

#include "vtkActor.h"
#include "vtkNew.h"
#include "vtkCamera.h"
#include "vtkCellArray.h"
#include "vtkFloatArray.h"
#include "vtkPointData.h"
#include "vtkPoints.h"
#include "vtkPolyData.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderWindow.h"
#include <vtkGenericOpenGLRenderWindow.h>
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"
#include <vtkLookupTable.h>
#include <vtkProperty.h>
#include <vtkCellData.h>
#include <vtkInteractorStyleTrackballCamera.h>
#include <vtkAssembly.h>

#include <vtkAutoInit.h>

VTK_MODULE_INIT(vtkRenderingOpenGL2)
VTK_MODULE_INIT(vtkInteractionStyle)
VTK_MODULE_INIT(vtkRenderingFreeType)

void createScene(vtkActor* actor)
{
    int i;
    //
    static float x[10][3]={{ 0, 0, 1}, { 0, 0,-1}
                          , { 0, 1, 0}, { 1, 1, 0}
                          , { 1, 0, 0}, { 1,-1, 0}
                          , { 0,-1, 0}, {-1,-1, 0}
                          , {-1, 0, 0}, {-1, 1, 0}};
    //
    static vtkIdType pts[8][4]={{0,1,2}, {0,1,3}, {0,1,4}, {0,1,5}
                                , {0,1,6}, {0,1,7}, {0,1,8}, {0,1,9}};
    //
    vtkPolyData *cube = vtkPolyData::New();
    vtkPoints *points = vtkPoints::New();
    vtkCellArray *polys = vtkCellArray::New();
    //
    vtkFloatArray *scalars = vtkFloatArray::New();
    //
    for(i=0;i<10;i++)points->InsertPoint(i,x[i]);
    //
    for(i=0;i<8;i++)polys->InsertNextCell(4,pts[i]);
    //
    for(i=0;i<8;i++)scalars->InsertTuple1(i,i);
    //
    cube->SetPoints(points);
    //
    cube->SetPolys(polys);
    //
    cube->GetCellData()->SetScalars(scalars);
    points->Delete();
    polys->Delete();
    scalars->Delete();
    //
    vtkLookupTable *pColorTable=vtkLookupTable::New();
    //
    pColorTable->SetNumberOfColors(6);
    pColorTable->SetTableValue(0, 1.0, 0.0, 0.0, 1.0);
    pColorTable->SetTableValue(1, 0.0, 1.0, 0.0, 1.0);
    pColorTable->SetTableValue(2, 1.0, 1.0, 0.0, 1.0);
    pColorTable->SetTableValue(3, 0.0, 0.0, 1.0, 1.0);
    pColorTable->SetTableValue(4, 1.0, 0.0, 1.0, 1.0);
    pColorTable->SetTableValue(5, 0.0, 1.0, 1.0, 1.0);
    pColorTable->Build();

    //
    vtkPolyDataMapper *cubeMapper = vtkPolyDataMapper::New();
    cubeMapper->SetScalarModeToUseCellData();
    cubeMapper->SetInputData(cube);
    cubeMapper->SetScalarRange(0,7);
    cubeMapper->SetLookupTable(pColorTable);
    actor->SetMapper(cubeMapper);
    actor->GetProperty()->SetOpacity(0.5);
}

int main(int argc, char** argv)
{
    vtkCamera *camera = vtkCamera::New();
    camera->SetPosition(1,1,1);
    camera->SetFocalPoint(0,0,0);

    vtkRenderer *renderer = vtkRenderer::New();

    vtkRenderWindow *renWin = vtkRenderWindow::New();
    renWin->AddRenderer(renderer);

    vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
    iren->SetRenderWindow(renWin);
    iren->SetInteractorStyle(vtkInteractorStyleTrackballCamera::New());

    vtkNew<vtkActor> actor1, actor2;
    createScene(actor1);
    renderer->AddActor(actor1);

    createScene(actor2);
    vtkNew<vtkAssembly> assembly;
    assembly->AddPart(actor2);
    assembly->SetPosition(3,0,0);
    renderer->AddActor(assembly);

    renderer->SetActiveCamera(camera);
    renderer->ResetCamera();
    renderer->SetBackground(0,0,0);

    renWin->SetSize(600,600);
    renWin->Render();
    iren->Start();
    return 0;
}

I guess it has to do with vtkRenderer.SetUseDepthPeeling()
I can reproduce it in python with vtk 8.1.2:

SetUseDepthPeeling(True):

SetUseDepthPeeling(False):

from vtkplotter import *

settings.useDepthPeeling = False

vtxs = [
    [0, 0, 1],
    [0, 0, -1],
    [0, 1, 0],
    [1, 1, 0],
    [1, 0, 0],
    [1, -1, 0],
    [0, -1, 0],
    [-1, -1, 0],
    [-1, 0, 0],
    [-1, 1, 0],
]
faces = [
    [0, 1, 2],
    [0, 1, 3],
    [0, 1, 4],
    [0, 1, 5],
    [0, 1, 6],
    [0, 1, 7],
    [0, 1, 8],
    [0, 1, 9],
]
arr = range(len(faces))

actor1 = Actor([vtxs,faces]).addCellScalars(arr, "myscals").alpha(0.5)
actor2 = Actor([vtxs,faces]).addCellScalars(arr, "myscals").alpha(0.5)
asse = Assembly([actor2])

show(actor1, asse, N=2, bg="black", viewup="z")

I tried it, there is some different, but the problem still exists.

%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20191127165446

I switch from vtk 8.1.2 to 8.2.0
With 8.1.2, the problem doesn’t appear.