updated rendering algorithm for volumes