Changing Alpha value on the fly for 3D RGBA texture
I am using 3D textures for volume rendering of raw data. The raw data can be Luminance-Alpha or RGBA.
I am currently reading raw data and setting the alpha value so that the farthest line (or chunk) is opaque (Alpha = 1) and the closest slice is "transparent" (say alpha = 0.1) and alpha the values โโare interpolated.
Is there any way in opengl I can change these alpha values โโdynamically. those. based on events like rotation? So the farthest slice is always opaque?
I am using the Scene Design Tool (www.openrm.org) to render a volume based on textures.
I think I am not looking for code, but any ideas I can do this efficiently on a GPU using OpenGL.
This conversation talks about the "alpha slice weight" which I intend to do (look at the pseudocode at the end)
http://www.ifi.uzh.ch/staff/stern/SciVis_WS2004/chstern/v100105/VolumeRendering/kulick/
Now the trick is to recalculate the alpha weight of the slice as the orientation changes.
source to share