
276 17. Real-Time Volumetric Lighting for WebGL
canvas. is transfer function widget allowed us to add new color keys as desired. en,
dragging the mouse on a color key modied the alpha value for the current color key.
Once the transfer function was modied, the WebGL texture associated to the transfer
function widget was also updated. All of this is possible because of a feature in WebGL to
create a texture directly from a canvas object. is way we can show or hide dierent den-
sities in the volume as desired. is method is used to selectively render musculature in
Figure17.6(a, b) and bones in Figure17.6(c). For the engine block data s