Add disableClipStyle to BranchState (backport #7109) [release/4.9.x] #7254
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is to address this issue: /~https://github.com/iTwin/itwin-graphics-backlog/issues/343
An optional
disableClipStyle
boolean has been added toGraphicBranchOptions
,BranchStateOptions
,BranchState
, andRealityMeshParams
. If settrue
, any clip in the branch will override the view'sDisplayStyleSettings.clipStyle
, and instead, noClipStyle.insideColor
orClipStyle.outsideColor
will be applied to the clip. This is accomplished withinBranchUniforms
every time a new branch is pushed to the stack by setting the alpha values ofClipStack.insideColor
,ClipStack.outsideColor
, andClipStack.intersectionStyle
to 0 ifdisableClipStyle
is true. Otherwise, it is left to the viewport'sDisplayStyleSettings.clipStyle
to determine these values.This is being applied to fix the above bug by overriding the clip style in branches created for rendering map tiles in
MapTile.ts
, and then passing that information along throughRealityMeshParams
.This is an automatic backport of pull request #7109 done by Mergify.