Render background and foreground into separate layers