refactor triangle filling algorithm and implement backface culling