Skip to content
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 (backport #7109) [release/4.9.x] #7254

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 10, 2024

This PR is to address this issue: /~https://github.com/iTwin/itwin-graphics-backlog/issues/343

An optional disableClipStyle boolean has been added to GraphicBranchOptions, BranchStateOptions, BranchState, and RealityMeshParams. If set true, any clip in the branch will override the view's DisplayStyleSettings.clipStyle, and instead, no ClipStyle.insideColor or ClipStyle.outsideColor will be applied to the clip. This is accomplished within BranchUniforms every time a new branch is pushed to the stack by setting the alpha values of ClipStack.insideColor, ClipStack.outsideColor, and ClipStack.intersectionStyle to 0 if disableClipStyle is true. Otherwise, it is left to the viewport's DisplayStyleSettings.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 through RealityMeshParams.


This is an automatic backport of pull request #7109 done by Mergify.

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
@mergify mergify bot requested a review from bbastings as a code owner October 10, 2024 20:00
@mergify mergify bot added the conflicts label Oct 10, 2024
@mergify mergify bot requested review from aruniverse, ben-polinsky and a team as code owners October 10, 2024 20:00
Copy link
Contributor Author

mergify bot commented Oct 10, 2024

Cherry-pick of b42bedd has failed:

On branch mergify/bp/release/4.9.x/pr-7109
Your branch is up to date with 'origin/release/4.9.x'.

You are currently cherry-picking commit b42bedd446.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   common/api/core-frontend.api.md
	new file:   common/changes/@itwin/core-frontend/andremig-clipstyle-bug_2024-08-26-17-00.json
	modified:   core/frontend/src/render/GraphicBranch.ts
	modified:   core/frontend/src/render/RealityMeshGraphicParams.ts
	modified:   core/frontend/src/render/RenderSystem.ts
	modified:   core/frontend/src/render/webgl/BranchState.ts
	modified:   core/frontend/src/render/webgl/BranchUniforms.ts
	modified:   core/frontend/src/render/webgl/RealityMesh.ts
	modified:   core/frontend/src/test/render/webgl/BranchUniforms.test.ts
	modified:   core/frontend/src/tile/map/MapTile.ts

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   core/frontend/src/render/webgl/Graphic.ts

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot requested a review from a team October 10, 2024 20:01
@pmconne pmconne merged commit a773701 into release/4.9.x Oct 14, 2024
16 checks passed
@pmconne pmconne deleted the mergify/bp/release/4.9.x/pr-7109 branch October 14, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants