コード例 #1
0
        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));
        }
コード例 #2
0
 public SortingCriterion(VFXAbstractParticleOutput output)
 {
     sortCriterion = output.GetSortCriterion();
     revertSorting = output.revertSorting;
     if (sortCriterion == SortCriteria.Custom)
     {
         sortKeySlot = output.inputSlots.FirstOrDefault(o => o.name == "sortKey");
     }
 }
コード例 #3
0
        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;
        }
コード例 #4
0
 public static SortingCriterion GetVoteFunc(VFXAbstractParticleOutput output)
 {
     return(new SortingCriterion(output.GetSortCriterion(), output.inputSlots.FirstOrDefault(s => s.name == "sortKey"), output.revertSorting));
 }