public static bool OutputNeedsOwnSort(VFXAbstractParticleOutput abstractParticleOutput, SortingCriterion globalSortCriterion, bool hasMainUpdate) { var outputSortingCriteria = new SortingCriterion(abstractParticleOutput); return((!hasMainUpdate && abstractParticleOutput.HasSorting()) || abstractParticleOutput.HasSorting() && !s_SortingCriteriaComparer.Equals(outputSortingCriteria, globalSortCriterion)); }
public SortingCriterion(VFXAbstractParticleOutput output) { sortCriterion = output.GetSortCriterion(); revertSorting = output.revertSorting; if (sortCriterion == SortCriteria.Custom) { sortKeySlot = output.inputSlots.FirstOrDefault(o => o.name == "sortKey"); } }
public void SetOutput(VFXAbstractParticleOutput output) { if (m_Output != null) throw new InvalidOperationException("Unexpected SetOutput called twice, supposed to be call only once after construction"); features = output.outputUpdateFeatures; if (features == VFXOutputUpdate.Features.None) throw new ArgumentException("This output does not need an output update pass"); m_Output = output; }
public static SortingCriterion GetVoteFunc(VFXAbstractParticleOutput output) { return(new SortingCriterion(output.GetSortCriterion(), output.inputSlots.FirstOrDefault(s => s.name == "sortKey"), output.revertSorting)); }