Refactor light tessellation