Skip to content

Clipping texture plumbing - #13636

Open
mzschwartz5 wants to merge 2 commits into
vector-textures-for-polygon-clippingfrom
clipping-texture-plumbing
Open

Clipping texture plumbing#13636
mzschwartz5 wants to merge 2 commits into
vector-textures-for-polygon-clippingfrom
clipping-texture-plumbing

Conversation

@mzschwartz5

@mzschwartz5 mzschwartz5 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

This is the third step in reimplementing Clipping Polygons on top of the vector data pipeline -- specifically, for terrain. In steps one and two, I introduced the machinery for vector-clipping. Now that we have the necessary APIs to create vector-clipping textures, this PR calls them to create and update / manage the lifecycle of these textures (for terrain; models to follow).

Issue number and link

https://github.com/iTwin/cesiumjs-web3d-internal/issues/33

Testing plan

Once again, no external / behavioral changes here. Clipping is still using the SDF path at this point. Regression testing with sandcastle (plus, since changes to Globe classes were made, general regression testing on globe rendering isn't a bad idea).

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

AI acknowledgment

  • I used AI to generate content in this PR
  • If yes, I have reviewed the AI-generated content before submitting

If yes, I used the following Tools(s) and/or Service(s):

If yes, I used the following Model(s):

PR Dependency Tree

This tree was auto-generated by Charcoal

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for the pull request, @mzschwartz5!

✅ We can confirm we have a CLA on file for you.

@mzschwartz5 mzschwartz5 Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I used a slightly different dirty mechanism than vector tiles uses. Rather than having a "clipping polygons dirty" flag on every terrain tile, I just have one on the clipping polygon collection. When the flag is set, I clear the clipping vector data on all tiles - which tells GlobeSurfaceTileProvider to recreate that data next time the tile is rendered.

The reasons for this choice were partly for memory reasons (fewer dirty flags), and also because of how ClippingPolygonCollection is structured differently from VectorProvider (and how it needs to serve both terrain and 3d tiles / models).

@mzschwartz5
mzschwartz5 marked this pull request as ready for review July 30, 2026 15:03
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from a24fd41 to 01f8ceb Compare July 31, 2026 16:57
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from 7886bf6 to 0c9fd7e Compare July 31, 2026 16:57
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from 01f8ceb to 90400af Compare July 31, 2026 18:55
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from 0c9fd7e to e044831 Compare July 31, 2026 18:55
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from 90400af to 0393846 Compare July 31, 2026 22:24
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from e044831 to 3ec33e6 Compare July 31, 2026 22:24
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from 0393846 to bdc7874 Compare August 3, 2026 01:07
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from 3ec33e6 to 05ce087 Compare August 3, 2026 01:07
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from bdc7874 to f1ffa66 Compare August 3, 2026 01:14
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from 05ce087 to 29f0964 Compare August 3, 2026 01:14
@mzschwartz5 mzschwartz5 mentioned this pull request Aug 3, 2026
8 tasks
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from f1ffa66 to 1e862fa Compare August 3, 2026 19:32
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from 29f0964 to 6431186 Compare August 3, 2026 19:32
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from 1e862fa to a2a430d Compare August 10, 2026 19:39
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from 6431186 to b9abfb8 Compare August 10, 2026 19:39
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from a2a430d to cd6a24f Compare August 18, 2026 17:20
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from b9abfb8 to 83888d6 Compare August 18, 2026 17:20
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from cd6a24f to 454ea56 Compare August 19, 2026 17:08
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from 83888d6 to 058325c Compare August 19, 2026 17:08
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from 454ea56 to 6c783e3 Compare August 19, 2026 19:38
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from 058325c to 00e0a0b Compare August 19, 2026 19:38
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from 6c783e3 to a862d38 Compare August 20, 2026 14:17
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from 00e0a0b to 91f077b Compare August 20, 2026 14:17
@mzschwartz5
mzschwartz5 force-pushed the vector-textures-for-polygon-clipping branch from a862d38 to 1f19e4a Compare August 20, 2026 14:33
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch 2 times, most recently from ea4ba28 to a326f98 Compare August 21, 2026 16:14
@mzschwartz5
mzschwartz5 force-pushed the clipping-texture-plumbing branch from a326f98 to 79c8b25 Compare August 21, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant