pass/rect: include clipBox in opaque calculations

ref #9730 ref #9709
This commit is contained in:
vaxerski
2025-03-26 11:47:04 +00:00
parent c2ef8fcc00
commit cec084c178

View File

@@ -33,5 +33,13 @@ std::optional<CBox> CRectPassElement::boundingBox() {
}
CRegion CRectPassElement::opaqueRegion() {
return data.color.a >= 1.F ? boundingBox()->expand(-data.round) : CRegion{};
if (data.color.a < 1.F)
return CRegion{};
CRegion rg = boundingBox()->expand(-data.round);
if (!data.clipBox.empty())
rg.intersect(data.clipBox);
return rg;
}