VFXExpressionStrips.cs 815 B

1234567891011121314151617181920212223
  1. using System.Collections.Generic;
  2. using UnityEngine.VFX;
  3. namespace UnityEditor.VFX
  4. {
  5. class VFXExpressionStripTangent : VFXExpression
  6. {
  7. public VFXExpressionStripTangent() : base(VFXExpression.Flags.PerElement | VFXExpression.Flags.InvalidOnCPU) { }
  8. public override VFXValueType valueType => VFXValueType.Float3;
  9. public override VFXExpressionOperation operation => VFXExpressionOperation.None;
  10. public override string GetCodeString(string[] parents)
  11. {
  12. return string.Format("GetStripTangent(attributes.position, relativeIndexInStrip, stripData)");
  13. }
  14. public override IEnumerable<VFXAttributeInfo> GetNeededAttributes()
  15. {
  16. yield return new VFXAttributeInfo(VFXAttribute.Position, VFXAttributeMode.Read);
  17. }
  18. }
  19. }