iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
583 stars 211 forks source link

Improve area pattern performance #4172

Open pmconne opened 1 year ago

pmconne commented 1 year ago

Is your feature request related to a problem? Please describe. Framerate can plummet when displaying patterned areas with highly-detailed boundary curves. The backend instances all of the pattern symbols and produces a boundary ClipVector to be applied to those symbols at display time. The more complicated/detailed the boundary, the more clip planes are produced, and the more work the fragment shader must do to clip the symbols.

Describe the solution you'd like Framerate remains acceptable when displaying complex patterned areas. A variety of options can be considered, possibly in combination:

Describe alternatives you've considered See above.

Additional context This issue is affecting a user. Contact me for further information.

pmconne commented 1 year ago

Example - all .txt files contain JSON (github disallows JSON attachments). Clip boundary . ClipVector produced in native code from clip boundary using chord tolerance of 1.4051897015886328. Union of convex clip plane sets produced on frontend from ClipVector.

This is what the boundary looks like: image

pmconne commented 1 year ago

This is on hold while product management attempts to convince the user to use materials or fill instead of area patterns.