-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Optimize picking #630
Comments
This will also optimize other passes like glow (e.g., a single bit mask) and shadow/depth pre-pass (depth only). |
We should also better document the performance costs of |
FYI...the bottleneck is, of course, in |
With WebGL 2.0, we can also use MRT to render the pick buffer in the same pass as the color. CC #797 |
Any thoughts on addressing this? Noticing that |
@billwritescode the biggest win will come from not stalling the CPU and starving the GPU with WebGL's |
10 years later, this still has a huge performance impact. What's the status on this issue now that the WebGL Roadmap is closed and the WEBGL_draw_buffers were not addressed? |
@skaughtx0r We're putting together our roadmap for our next year of development starting in March, and are hoping to take advantage of the fact that WebGL2 is now the default in CesiumJS to do some optimizations like this. |
It should be possible to convert The result would be that, when the mouse moves, the feedback would not be synchronous with the mouse movement, but instead the feedback would come after the data is available, so a bit extra end-to-end time. The nice thing with this, though, is that there would be no stalling of the GPU pipeline, and you could keep moving the camera while the pixels are being read 🙂. Mention me if you want a code snippet example in this thread, it’s actually a small bit of code but of course in the consuming side it needs to be taken into account that the pixel reading operation would need to be |
@tmarti could you post the code snippet you mentioned? |
The fix for #583 slows down the fragment shader for picking because it executes the full fragment shader for materials. If we know a material doesn't have any transparent parts (and doesn't write depth in the future), we can just use a simple pass-through shader.
The text was updated successfully, but these errors were encountered: