Closed frasercl closed 1 year ago
I think there might be still one more thing to do here. When texture2d is called in the shader, the gpu filters the lookup according to filtering settings on the texture that are set in the JavaScript. Do a search for LINEAR or NEAREST in the code. It might be set at texture creation time but it can also be set later. This could also be the way to make it work for pathtrace mode too.
For raymarch this would filter the xy lookup but the z filtering would still be the manually implemented math we are already doing. For pathtrace, if it uses a full 3D texture, then all 3 axes of the lookup would be filtered.
Resolve #62: add "the option to toggle voxel interpolation like in napari." (In ray march mode - would disabling interpolation in pathtrace mode mean anything or make sense?) Via:
setInterpolationEnabled
to change interpolation behaviorAnd a couple stray modifications:
rayMarchedAtlasVolume.setUniform
a solid type signatureScreenshots
(from website-3d-cell-viewer)
I also attempted to replicate the same image of a cell membrane in both website-3d-cell-viewer and Fiji, to verify that the shader math is correct and samples pure pixel values. Fiji is first, 3d viewer is second: