-
-
Notifications
You must be signed in to change notification settings - Fork 35.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
Examples: Fix broken GPU picking demo. #25952
Conversation
I would do this, instead: // give the geometry's vertices a color corresponding to the "id"
applyVertexColors( geometry, color.setHex( i, THREE.NoColorSpace ) ); |
Yep, that works as well. I'm open for all configurations... |
Updated the PR so the |
Oops sorry, I missed @WestLangley's comment! I'm fine with this as it is too. :) |
This is a larger change but imo with WebGL2 now broadly supported this is the kind of thing that should be rendering to an Red Integer buffer instead of using colors or even floats. I'd be happy to make a PR to update and modernize this gpu picking example if people are supportive. It would require merging #22351 (or something similar), though, since it's currently not possible to clear integer targets in three.js. WebGPU will bring the ability for a lot more GPGPU capabilities so it would be nice to start considering APIs these types of targets that are useful for it. cc @mrdoob |
Related issue: https://discourse.threejs.org/t/how-can-i-render-400000-polygons-mesh/50957/12
Description
webgl_interactive_cubes_gpu is broken because the picking does not work anymore. The reason for this is the enabled color management and the fact that the render target holds sRGB values without specifying the right color space.