general refactorings for offscreen rendering (pre sampling)