Now the gradient functions perfectly (using 16F for the texture). Now working to avoid the gradient of invisible voxels to affect the final image.