Skip to content

refactor(viz): store transfer function as 2D Nx1x1 texture

Description

We now store transfer function as "fake" 1D textures, i.e. 2D textures of size Nx1x1 in format RGBA8 (previously ARGB8). This solves compatibility problems for API interops not supporting GL_TEXTURE_1D and allowing to read only in the order R->G->B->A (ex: CUDA).

Additionally, because it literally took 1 line change, I fixed preintegration for 8-bit textures.

Closes #989 (closed)

How to test it?

Launch ./bin/sightviewer and play with the transfer function. Everything works as expected.

Edited by Erwan DUHAMEL

Merge request reports