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

Shader variants for unquantized vertex tables #3445

Merged
merged 21 commits into from
Mar 31, 2022
Merged

Conversation

pmconne
Copy link
Member

@pmconne pmconne commented Mar 30, 2022

#3288 introduced this feature. #3401 partially reverted it due to performance impact on the shaders for quantized vertex tables.
This PR reintroduces the feature using separate shader variants to avoid impact on the quantized shaders.
It also applies performance optimizations for the new shaders devised by @DStradley and @MarcNeely.
Decoration graphics now use unquantized positions to reduce potential visual artifacts caused by reduced precision of quantized positions when graphics span large distances.
A subsequent PR will change requestElementGraphics to use unquantized positions by default as well, for the same reason.

@pmconne
Copy link
Member Author

pmconne commented Mar 31, 2022

ImageTests queued.

@pmconne pmconne marked this pull request as ready for review March 31, 2022 14:11
@pmconne pmconne requested review from kabentley, bbastings and a team as code owners March 31, 2022 14:11
@pmconne pmconne merged commit c6781fa into master Mar 31, 2022
@pmconne pmconne deleted the pmc/unquantized-shaders branch March 31, 2022 17:18
pmconne added a commit that referenced this pull request Mar 31, 2022
* switch back to unquantized vertex tables for decoration graphics.

* technique flag for unquantized vs quantized positions.

* Unquantized technique variants.

* update early z flags.

* propagate position type to vertex shader builder.

* don't bother updating unused uniform

* additional vertex data

* read unquantized positions.

* color

* edge

* polyline

* surface.

* Turn on unquantized vertex tables for decorations.

They mostly don't draw properly or at all. Point strings look like they work.

* typo

* adjust expected vertex size

* Choose unquantized shaders where appropriate.

* Remove spurious assertion - will fail if previous mesh produced no graphics.

* remove u_qOrigin/Scale from shaders that don't need them.

* further cleanup of shader code.

* further cleanup of shader code.

(cherry picked from commit c6781fa)
pmconne added a commit that referenced this pull request Apr 19, 2022
* Shader variants for unquantized vertex tables (#3445)

* switch back to unquantized vertex tables for decoration graphics.

* technique flag for unquantized vs quantized positions.

* Unquantized technique variants.

* update early z flags.

* propagate position type to vertex shader builder.

* don't bother updating unused uniform

* additional vertex data

* read unquantized positions.

* color

* edge

* polyline

* surface.

* Turn on unquantized vertex tables for decorations.

They mostly don't draw properly or at all. Point strings look like they work.

* typo

* adjust expected vertex size

* Choose unquantized shaders where appropriate.

* Remove spurious assertion - will fail if previous mesh produced no graphics.

* remove u_qOrigin/Scale from shaders that don't need them.

* further cleanup of shader code.

* further cleanup of shader code.

(cherry picked from commit c6781fa)

* tile specifies unquantized positions.

* keyin to generate element graphics.
pmconne added a commit that referenced this pull request Apr 20, 2022
* 3.2.0-dev.27

* Presentation: Clarify `onlyIfNotHandled` attribute (#3418)

* Clarify `onlyIfNotHandled` attribute

* Reword `onlyIfNotHandled` attribute's description

* Fix overlay map layers that were displayed at the wrong elevation (#3394)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Fix framebuffer resize issue that causes WebGL errors (#3406)

* Work around framebuffer resize issues that can cause WebGL errors.

* Should check for viewRect size change in rendersToScreen setter.

* revert protected change

* rush change

* Add test for this specific problem.

* rush extract-api

* 3.2.0-dev.28

* 3.1.0 changelogs (#3440)

Co-authored-by: imodeljs-admin <[email protected]>

* Create a pipeline to run core tests on ios  (#3345)

* Introduce a pipeline for running core units tests on ios using SwiftUI.
* Add processAppCenterLogs script for uploading test result files
* Add the runMocha.js to initiate the tests and add docs on process.
* Setup nightly trigger for the iOS testing

* Update native addon version in pbxproj to match master.

* Add setting to auto-collapse unpinned widget panels (#3439)

* Add ability to auto collapse unpinned widget panels

* rush change

* extract-api again

* Add camera paths to display-test-app (#3365)

* Add camera paths to display-test-app

* Fix a bug causing camera path to not load properly when changing iModels in display-test-app

* Fix a bug causing orientation of a tilting camera path to not be recorded properly

* Add mention of unsupported global coordinates in camera paths

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3.2.0-dev.29

* Improve RealityTile loading priority calculation (#3373)

* Improve RealityTile loading priority calculation

* extract-api

* rush change

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Improve support for WMS  server 1.1.1 (#3444)

* Improved support for WMS 1.1.1 servers.

* changelog

* Removed .only in tests.

* Renamed variable '_json' to 'json'

* API extract.

* Request next animation frame when selection set changes (#3450)

* fix map-layers peer deps (#3447)

Co-authored-by: Arun George <[email protected]>

* 3.1.1 changelogs (#3454)

Co-authored-by: imodeljs-admin <[email protected]>

* Shader variants for unquantized vertex tables (#3445)

* switch back to unquantized vertex tables for decoration graphics.

* technique flag for unquantized vs quantized positions.

* Unquantized technique variants.

* update early z flags.

* propagate position type to vertex shader builder.

* don't bother updating unused uniform

* additional vertex data

* read unquantized positions.

* color

* edge

* polyline

* surface.

* Turn on unquantized vertex tables for decorations.

They mostly don't draw properly or at all. Point strings look like they work.

* typo

* adjust expected vertex size

* Choose unquantized shaders where appropriate.

* Remove spurious assertion - will fail if previous mesh produced no graphics.

* remove u_qOrigin/Scale from shaders that don't need them.

* further cleanup of shader code.

* further cleanup of shader code.

* Fix unquantized vertex read for WebGL 1. (#3456)

* 3.2.0-dev.30

* Reality tile priority on zoom target (#3459)

* Use target center when it exist instead of screen center to compute reality tilles loading priority

* Use wheel event as the only target point and check that it is recent enough

* Apply suggestions

* Rush change

* 3.2.0-dev.31

* 3.2.0-dev.32

* 3.2.0-dev.33

* Added missing properties concerning additional transform paths in GeographicCRS (#3465)

* Added missing properties concerning additional transform paths in GeographicCRS

* fixed lint errors

* extract-api

* rush change

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3.2.0-dev.34

* Presentation: Initialize schemas preloading on Presentation.initialize (#3467)

* Configure schemas preloading on Presentation.initialize

* rush change

* rush extract-api

* Fix OOM error stemming from dynamic import of a very large object (backport #3471) (#3473)

Co-authored-by: Arun George <[email protected]>
Co-authored-by: Arun George <[email protected]>

* 3.2.0-dev.35

* Fix blank rendering when dropping and immediately re-adding the same viewport (#3472)

* Do not update canvas dimensions if 0. Resolves an issue with a black rendering when a viewport is dropped and re-added with the same dimensions.

* rush change

* New datum grid file formats identifiers (#3475)

* Added two grid file formats

* extract-api

* rush change

* Restore Mobile Authorization (#3474)

* Restore authorization in MobileHost.

* Fix ios Display Test App (#3354)

* electron-authorization in display-test-app/ios/backend.config.js needs to have 'null-loader'

* Fix electron import and webpack config in display-test-app.

* Disable sign-in for mobile in display-test-app.

* 3.2.0-dev.36

* 3.1.2 changelogs (#3488)

Co-authored-by: imodeljs-admin <[email protected]>

* Move iOS Testing Resources to tools/internal (#3461)

* Move iOS Testing Resources to tools/internal.

* Add automation for linting and code gen for Extension package (#3146)

Co-authored-by: kckst8 <[email protected]>
Co-authored-by: johnnyd710 <[email protected]>
Co-authored-by: Arun George <[email protected]>

* 3.2.0-dev.37

* Added documentation for BingMaps and MapBox. (#3492)

* Added documentation for BingMaps and MapBox.

* Added Azuremaps format, fixed typo.

* Update MapLayerFormatRegistry.ts

* change log

* api-extract

Co-authored-by: Paul Connelly <[email protected]>

* Fix MSAA hang for Mali-G71 and Mali-G76 GPUs (#3499)

* 3.2.0-dev.38

* Add ability to pass overrides to UiItemsManager (#3462)

* Add ability to pass overrides to UiItemsManager

* Updates to unit testing and to filter duplicates at UiItemsManager level.

* updates unit tests

* extract-api

* rush change

* Add documentation for new feature.

* fix warning seen when running unit test

* fix linting errors

* Remove static register method from new UiItemsProviders

* update provider registration in ui-test-app

* Allow apps to delay registration of the UiItemsProviders,
So they can be registered with overrides.
Default initilization behaves the same.

* Lint errors

* Change registerUiItemsProvider to accept an object.

Co-authored-by: NancyMcCallB <[email protected]>

* 3.2.0-dev.39

* 3.2.0-dev.40

* Change Map-layers extension code owners (#3502)

* Use iTwinUI-react components to get consistent styling. (#3482)

* Use iTwinUI-react components to get consistent styling.

* Fixed bug with elevation correction control.

* change log.

* No longer override default button styling

* Fine tune eye-icon position in sublayer tree.

* fine tune eye checkbox style.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* 3.2.0-dev.41

* Fix jumpy view zoom on touch devices (#3498)

* Remove inertia from view touch handling as soon as zoom is detected

Previously required another event for inertia to be removed and not
re-added. If touches ended before then, inertia would cause the view
to incorrectly pan after a zoom gesture.

* Properly handle touch count change in

Previously if a touch was removed and re-added without a touch
move event in between, the change in touch count would go
undetected. In pinch-lift one finger-pinch scenario that caused
zoom to be calculated from first pinch start position, causing zoom
jumps at the start of the second pinch.

* rush change

* rush extract-api

* Add RPC operations, "getCustomViewState3dData", "hydrateViewState" to minimize back and forth communication between frontends and backends (#3326)

* WIP

* Create defaultviewcreator on backend

* Rename DefaultViewcreator->ViewcreatorHelper

* rename to viewcreatorhelper

* compress modelids before sedning them to getDefaultViewStateData

* use compressed set

* remove two helper functions which now exist on backend

* Add options object to rpc instead of modelids

* add 3d to the name of the viewhelper

* More renames, SerializedViewStateprops - > DefaultViewState3dProps, remove 'helper' name

* Initial commit of viewstatehydrater

* properly handle promises in viewstatehydrater

* Mark defaultviewstate3dcreator as internal

* add some comments

* comments

* rush lint

* pass hydrate props to preload/postload

* put body on separate line from conditional to match coding guidelines

* add newline after closing brace

* spacing

* more coding guidelines

* Rename DefaultViewState3dCreator to CustomViewState3dCreator

* extract-api

* Missed file change for extract-api

* change

* use only one viewStateLoadprops for entire hydrate request

* Dont throw error, log error

* dont use preload postload in modelselectorstate

* check for baseModelId differently

* more if statement separation

* Use the same "missing" in the subcategoriescache for both preload and postload

* don't recalculate missing, don't use hydrate in modelselectorstate

* extract-api

* add tests for viewcreator3d

* add a test making sure that long get requests work

* missed a if on same line as code

* rush change

* remove .only

* wip

* Mock hydrateViewState for appui-react tests

* rush change

* add docs-group-description

* 3.2.0-dev.42

* add excluded advisory (#3513)

* Cleanup imodel transformer test app (#3514)

- use typed yargs instead of manually specifying the type and casting
- remove electron dependency and use new node cli auth client
- don't sign in when using a cached briefcase
- clean up readme to stop recommending `--long-arg=value` and instead recommend `--long-arg value`

* UI: Tool Settings updates (#3519)

* Add "No tool settings" message to docked tool settings.

* First pass animation.

* Move tool settings bar animation to
layout package to avoid animating overflow panel.

* Respect the animateToolSettings state variable

* Final cleanup of tool settings animations and tests.

* Update animation time per UX team.

* Update snaps and api docs after merge.

* rush change

* manual fix to api doc

* Merge remote-tracking branch 'origin/master' into ui/react-icons

Co-authored-by: bsteinbk <[email protected]>

* Bug fix for hydrateViewState (#3518)

* 3.2.0-dev.43

* Add "getMassPropertiesPerCandidate" RPC operation (#3366)

* Added IModelReadRpcInterface function to get mass properties for multiple elements with a single request.

* Renamed the new getMassProperties rpc method.

* extract-api

* changelog

* IModelReadRpcInterface version bump

* Added integration test for getMassPropertiesPerCandidate RPC method

* rush change for the integration test

* Added docks provided by @bbastings

* Removed 1000 candidate limit, getting mass properties in parallel, and added public method

* Documentation note for getMassProperties on when to use getMassPropertiesPerCandidate.

* rush extract-api

* rush change

* Catch all Parasolid severe errors

* Fix pickers styling to align (#3523)

* 3.2.0-dev.44

* Add some tests for subcategories (#3524)

* 3.1.3 changelogs (#3530)

Co-authored-by: imodeljs-admin <[email protected]>

* Read pixel improvements (#3504)

* Add conditions to skip onMotionSnap events

* Reuse ReadPixel resources when possible

* Remove test code

* Remove the move distance criterion to skip a read pixel call

* Add maxOnMotionSnapCallPerSecond tool setting

* Fix typo in createOrReuseReadPixelResources comment

* Force onMotionSnap on ToolAdmin button down

* Move the end of motion detection in the onMotion function

* Add a maximum size to reusable resources in ReadPixel

* rushchange and api extract

* Implement PolyfaceBuilder.addSweptIndexedPolyface (#3527)

* implement PolyfaceBuilder.addSweptIndexedPolyface

* attempt to silence docs build error

* make getEdgeIndices private

* remove bangs

* 3.2.0-dev.45

* 3.2.0-dev.46

* @bentley/imodeljs-native 3.2.4

* lint

* 3.2.0-dev.47

* 3.2.0-dev.48

* @bentley/imodeljs-native 3.2.6

* lint

* Account for orthographic view points in ViewState3d.lookAtGlobalLocation (#3535)

* ViewState3d.lookAtGlobalLocation should account for orthographic view points.

* rush change

* Fix UI 1.0 bug were widgets defined by providers did not honor the Center Zone position (#3534)

* Honor Center ZoneLocations from itemproviders when in UI1.0 mode.

* Add example of setting up widgets to hide in show properly in both UI1  and UI1.

* lint

* bad module

* 3.2.0-dev.49

Co-authored-by: imodeljs-admin <[email protected]>
Co-authored-by: Grigas <[email protected]>
Co-authored-by: Michel D'Astous <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: markschlosseratbentley <[email protected]>
Co-authored-by: Seamus Kirby <[email protected]>
Co-authored-by: Daniel Toby <[email protected]>
Co-authored-by: Bill Steinbock <[email protected]>
Co-authored-by: TitouanLeDuigou <[email protected]>
Co-authored-by: Arun George <[email protected]>
Co-authored-by: Arun George <[email protected]>
Co-authored-by: AlainRobertAtBentley <[email protected]>
Co-authored-by: Saulius Skliutas <[email protected]>
Co-authored-by: Spencer Barnes <[email protected]>
Co-authored-by: kckst8 <[email protected]>
Co-authored-by: johnnyd710 <[email protected]>
Co-authored-by: NancyMcCallB <[email protected]>
Co-authored-by: Eimantas Morkūnas <[email protected]>
Co-authored-by: nick4598 <[email protected]>
Co-authored-by: Michael Belousov <[email protected]>
Co-authored-by: MindaugasButkus <[email protected]>
Co-authored-by: dassaf4 <[email protected]>
Co-authored-by: Bill Goehrig <[email protected]>
Co-authored-by: Michael Belousov <[email protected]>
Co-authored-by: Colin Kerr <[email protected]>
Co-authored-by: DStradley <[email protected]>
Co-authored-by: Akshay Nangare <[email protected]>
Co-authored-by: Robert Lukasonok <[email protected]>
Co-authored-by: christophermlawson <[email protected]>
Co-authored-by: Caleb Shafer <[email protected]>
Co-authored-by: MarcBedard8 <[email protected]>
Co-authored-by: GerardasB <[email protected]>
Co-authored-by: williamkbentley <[email protected]>
Co-authored-by: MarcNeely <[email protected]>
Co-authored-by: Paulius Valiūnas <[email protected]>
Co-authored-by: bbastings <[email protected]>
Co-authored-by: AJMigliore <[email protected]>
Co-authored-by: Travis Cobbs <[email protected]>
Co-authored-by: mgooding <[email protected]>
Co-authored-by: Alina Paliulionytė <[email protected]>
Co-authored-by: Alina Paliulionyte <[email protected]>
Co-authored-by: Martynas <[email protected]>
pmconne added a commit that referenced this pull request May 4, 2022
* Support unquantized vertex tables (#3495)

* Shader variants for unquantized vertex tables (#3445)

* switch back to unquantized vertex tables for decoration graphics.

* technique flag for unquantized vs quantized positions.

* Unquantized technique variants.

* update early z flags.

* propagate position type to vertex shader builder.

* don't bother updating unused uniform

* additional vertex data

* read unquantized positions.

* color

* edge

* polyline

* surface.

* Turn on unquantized vertex tables for decorations.

They mostly don't draw properly or at all. Point strings look like they work.

* typo

* adjust expected vertex size

* Choose unquantized shaders where appropriate.

* Remove spurious assertion - will fail if previous mesh produced no graphics.

* remove u_qOrigin/Scale from shaders that don't need them.

* further cleanup of shader code.

* further cleanup of shader code.

(cherry picked from commit c6781fa)

* tile specifies unquantized positions.

* keyin to generate element graphics.

* Presentation: Can't remove related properties from supplemental rulesets (#3547)

* Documentation for bug fixes

* Code review fixes

Co-authored-by: Alina Paliulionyte <[email protected]>

* @bentley/imodeljs-native 3.2.7

* extract-api

Co-authored-by: imodeljs-admin <[email protected]>
Co-authored-by: Grigas <[email protected]>
Co-authored-by: Michel D'Astous <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: markschlosseratbentley <[email protected]>
Co-authored-by: Seamus Kirby <[email protected]>
Co-authored-by: Daniel Toby <[email protected]>
Co-authored-by: Bill Steinbock <[email protected]>
Co-authored-by: TitouanLeDuigou <[email protected]>
Co-authored-by: Arun George <[email protected]>
Co-authored-by: Arun George <[email protected]>
Co-authored-by: AlainRobertAtBentley <[email protected]>
Co-authored-by: Saulius Skliutas <[email protected]>
Co-authored-by: Spencer Barnes <[email protected]>
Co-authored-by: kckst8 <[email protected]>
Co-authored-by: johnnyd710 <[email protected]>
Co-authored-by: NancyMcCallB <[email protected]>
Co-authored-by: Eimantas Morkūnas <[email protected]>
Co-authored-by: nick4598 <[email protected]>
Co-authored-by: Michael Belousov <[email protected]>
Co-authored-by: MindaugasButkus <[email protected]>
Co-authored-by: dassaf4 <[email protected]>
Co-authored-by: Bill Goehrig <[email protected]>
Co-authored-by: Michael Belousov <[email protected]>
Co-authored-by: Colin Kerr <[email protected]>
Co-authored-by: DStradley <[email protected]>
Co-authored-by: Akshay Nangare <[email protected]>
Co-authored-by: Robert Lukasonok <[email protected]>
Co-authored-by: christophermlawson <[email protected]>
Co-authored-by: Caleb Shafer <[email protected]>
Co-authored-by: MarcBedard8 <[email protected]>
Co-authored-by: GerardasB <[email protected]>
Co-authored-by: williamkbentley <[email protected]>
Co-authored-by: MarcNeely <[email protected]>
Co-authored-by: Paulius Valiūnas <[email protected]>
Co-authored-by: bbastings <[email protected]>
Co-authored-by: AJMigliore <[email protected]>
Co-authored-by: Travis Cobbs <[email protected]>
Co-authored-by: mgooding <[email protected]>
Co-authored-by: Alina Paliulionytė <[email protected]>
Co-authored-by: Alina Paliulionyte <[email protected]>
Co-authored-by: Martynas <[email protected]>
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