private void Update(EvaluationContext context) { int count = Count.GetValue(context); Int3 groupSize = ThreadGroupSize.GetValue(context); DispatchCount.Value = (groupSize.X > 0) ? new Int3(count / groupSize.X + 1, 1, 1) : Int3.Zero; }
private void Update(EvaluationContext context) { var particleSystem = ParticleSystem.GetValue(context); if (particleSystem == null) { return; } var groupSize = ThreadGroupSize.GetValue(context); DispatchCount.Value = (groupSize.X > 0) ? new Int3(particleSystem.MaxCount / groupSize.X, 1, 1) : Int3.Zero; }