optimize rendering pipeline