AllenCell / AllenCell/vole-core
Render to pick buffer in main mesh pass
- Lingua principale
- TypeScript
- Stelle
- 106
- Fork
- 11
- Merge medio
- 3g 51m
- PR unite (30g)
- 12
Descrizione
## Use Case
As of #402, PickVolume now is responsible for drawing all meshes to the pick buffer in addition to the volume. This gives it too many responsibilities, and requires us to redo the raymarch step on every render even if the pick volume hasn't changed.
A cleaner approach would be to separate the pick buffer out of PickVolume. Instead, the pick buffer should be attached to the main renderer, so other render passes can optionally write to it. Meshes should be able to write to it and the color buffer at once.
## Solution
- [ ] Externalize the pick buffer out of `PickVolume` and into `ThreeJsPanel`.
- [ ] `ThreeJsPanel` should make the pick buffer accessible to external callers, or provide a `hitTest` function.
- [ ] The pick buffer should be attached to the main renderer, with clear documentation noting its usage.
- [ ] Remove the requirement for `AnimateFunction` to have a reference to the scene (but pass in the pick buffer instead).
- [ ] Update `Spheres3d` to write directly to the pick buffer during the color pass.
## Alternatives
_Please describe any alternatives you've considered, even if you've dismissed them_
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.