-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add disableClipStyle to BranchState #7109
Conversation
Co-authored-by: Ben Polinsky <78756012+ben-polinsky@users.noreply.github.com>
Since this PR is not critical, we will wait until @pmconne returns to office next week and has a chance to look at it before merging it in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing tests.
A unit test has been added to |
…injs-core into andremig/clipstyle-bug
This pull request is now in conflicts. Could you fix it @andremig-bentley? 🙏 |
Final step before merging is to figure out why |
Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com>
@Mergifyio backport release/4.9.x |
✅ Backports have been created
|
Co-authored-by: andremig-bentley <andremig-bentley@users.noreply.github.com> Co-authored-by: Ben Polinsky <78756012+ben-polinsky@users.noreply.github.com> Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com> (cherry picked from commit b42bedd) # Conflicts: # core/frontend/src/render/webgl/Graphic.ts
…7254) Co-authored-by: andremig-bentley <101671244+andremig-bentley@users.noreply.github.com> Co-authored-by: Todd.Southen <toddsouthenbentley@users.noreply.github.com>
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
.