hms-dbmi / viv

Library for multiscale visualization of high-resolution multiplexed bioimaging data on the web. Directly renders Zarr and OME-TIFF.
http://avivator.gehlenborglab.org
MIT License
274 stars 42 forks source link

chore: wip attempt to upgrade deck&luma #805

Open xinaesthete opened 3 months ago

xinaesthete commented 3 months ago

Addresses # https://github.com/hms-dbmi/viv/issues/804

Background

As discussed https://github.com/hms-dbmi/viv/discussions/790

Fairly extensive changes will be required; discussion should probably migrate to here.

xinaesthete commented 3 weeks ago

ok @ilan-gold with latest luma.gl it does now render volumes correctly - although still using a bit of an ugly hack so we don't get errors about null texture bindings... that should be cleaned up before this gets merged (in both xr-layer.js and xr-3d-layer.js). Can't remember off the top of my head whether there were any other significant things (apart from material-ui / react etc maybe being worth updating).

This is up to date with main branch.

FWIW, the volume rendering is also much quicker with a version of the shader that doesn't try to read all 6 values - would be good for that to be implemented differently at some point.

manzt commented 3 weeks ago

It might be good to also update React / Material-UI / Zustand;

Agreed, but let's consider a separate PR for that. This PR is large and involves breaking changes, so I suggest:

Then we can merge dev into main when we are ready to make a release. This approach will result in smaller, more manageable PRs.

ilan-gold commented 3 weeks ago

ok @ilan-gold with latest luma.gl it does now render volumes correctly - although still using a bit of an ugly hack so we don't get errors about null texture bindings...

Great

FWIW, the volume rendering is also much quicker with a version of the shader that doesn't try to read all 6 values - would be good for that to be implemented differently at some point.

I'll have to look into this. I vaguely remember trying to optimize this at one point but honestly don't remember super well.

ilan-gold commented 3 weeks ago

The RGB now renders but it is a bit slow for me. Let me know @xinaesthete if you get my email with data and see the same. IF so, I will try to make a smaller reproducer to focus the issue and maybe report because profiling isn't showing anything.

xinaesthete commented 3 weeks ago

I'll have a look, I think the performance is similar to what it always was, which could definitely be improved.

Edit, not tried with RGB, was mostly thinking about volume.

xinaesthete commented 3 weeks ago

Also I'm not sure why the tests hang on (or after?) packages/layers test: ScaleBarLayer#Empty props - haven't checked whether that's the same with main.

All other tests pass if scale-bar-layer is skipped.

xinaesthete commented 3 weeks ago

I've noticed there's a bug with 'lens' - switching channel causes something to go badly wrong (edit: should be fixed now).