Reworked viewport_render()