Refactoring for ray casting volume rendering.