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:
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user