1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with Graphic3d_TOSM_UNLIT shading model

Prs3d_ShadingAspect::SetTransparency() now sets transparency also to interior color.
AIS_RubberBand now uses Graphic3d_TOSM_UNLIT.
This commit is contained in:
kgv
2020-07-22 22:34:03 +03:00
committed by bugmaster
parent 6d8f9f4a49
commit 9f013fee98
5 changed files with 103 additions and 25 deletions

View File

@@ -144,12 +144,14 @@ void Prs3d_ShadingAspect::SetTransparency (const Standard_Real theValue,
|| theModel == Aspect_TOFM_BOTH_SIDE)
{
myAspect->ChangeFrontMaterial().SetTransparency (Standard_ShortReal(theValue));
myAspect->SetInteriorColor (Quantity_ColorRGBA (myAspect->InteriorColor(), 1.0f - Standard_ShortReal(theValue)));
}
if (theModel == Aspect_TOFM_BACK_SIDE
|| theModel == Aspect_TOFM_BOTH_SIDE)
{
myAspect->ChangeBackMaterial().SetTransparency (Standard_ShortReal(theValue));
myAspect->SetBackInteriorColor (Quantity_ColorRGBA (myAspect->BackInteriorColor(), 1.0f - Standard_ShortReal(theValue)));
}
}