refactor(viz): store transfer function as 2D Nx1x1 texture
Description
We currently store transfer functions as "real" 1D textures.
It causes some problems with API interoperability.
For example, CUDA-GL interop does not support GL_TEX_1D
.
Proposal
- Replace it by a
N
x1
x1
"mock" 1D texture, created withGL_TEXTURE_2D
. - Change
sampler1D
tosampler2D
accordingly in the shaders.
WARNING: this is a breaking change for all shaders based on the ones in Sight. That will require the same refactoring.
Functional specifications
Everything behaves as before.
Technical specifications
See above. Concretely, this involves changes in:
viz::scene3d::details::TFManager
viz::scene3d::vr::RayTracingVolumeRenderer
And for shaders:
TransferFunction.inc.glsl
Negato_FP.glsl
Video_FP.glsl
ApplyTransferFunction_FP.glsl
RayTracedVolumeDepth.glsl
VolumeBricks_FP.glsl
VolumeSampling.inc.glsl
Negato.material
Video.program
SummedAreaTable.material
VolumeBricks.material
Test plan
Graphics tests. And also manual testing.