-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HYDRA-339 - fix the calculation of pickmatrix and use a smaller pick …
…buffer (#409) HYDRA-339 - fix the calculation of pickmatrix and use a smaller pick buffer Changes: Fix the error in calculation of pick matrix What pick matrix does is applies a scale and translation to the projection matrix so that a small part of the scene around the pick point gets projected into the whole viewport. Most of the scene will get clipped away. What doesn't get clipped is a candidate for 'picking'. The calculation of pick matrix can be deducted by: 1). map the given viewport sub region around pick point into clip space (assuming that the given viewport covers -1…1) 2). compute a matrix which scales and translates this clip space sub region to cover the whole area of -1…1 in X and Y Use the size of pick region instead of full viewport to render id buffers for picking to improve perf 1).Marquee/single click selection would get improvement as the pick region is usually much smaller than full viewport. 2).Point snapping selection wouldn't get improvement as the pick region is same as full viewport, need to think about other approaches. Impacts: Selection &Highlighting under mayaHydra
- Loading branch information
1 parent
73a6a89
commit e678820
Showing
2 changed files
with
103 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters