private static void FilterCasters(RenderContext context, ref FastListStruct <RenderMesh> meshes) { for (int i = 0; i < meshes.Count; i++) { // If there is no caster if (!meshes[i].IsShadowCaster) { meshes.SwapRemoveAt(i--); } } }