-
Notifications
You must be signed in to change notification settings - Fork 121
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
Only draw one pixel in getID to lower performance impact on mousedown #217
Comments
This is a great idea. You are most welcome to contribute with a pull request :-) |
I will probably, although the develop branch is confusing and I had to change a lot to make it build. On a same fashion, there's no need to call getID at all when no handlers are bound to the pick/dblclick events |
Here: Slight performance gain, although I'm still having long (> 100ms) |
Thank you very much! I'll review and merge in the next few days. |
After much experimentation and research, readPixels is slow regardless of how many pixels are read or drawn. I wanted to have picking at every frame in order to have mouse hover interactions but on integrated graphics card it axes the framerate in half. Might try to do picking via raycasting instead. |
Update with al the latest changes
Viewer.getID
draws a viewport of half the size of the regular viewport. This could be greatly improved by drawing a viewport of only one pixel, offseting the screen to have only the pixel at x,y coordinates drawn.This is how we had implemented picking in our 3D engine at my previous company.
The text was updated successfully, but these errors were encountered: