IMayRequireTangent.cs 598 B

12345678910111213141516171819
  1. using UnityEditor.Graphing;
  2. using UnityEditor.ShaderGraph.Internal;
  3. namespace UnityEditor.ShaderGraph
  4. {
  5. interface IMayRequireTangent
  6. {
  7. NeededCoordinateSpace RequiresTangent(ShaderStageCapability stageCapability = ShaderStageCapability.All);
  8. }
  9. static class MayRequireTangentExtensions
  10. {
  11. public static NeededCoordinateSpace RequiresTangent(this ISlot slot)
  12. {
  13. var mayRequireTangent = slot as IMayRequireTangent;
  14. return mayRequireTangent != null ? mayRequireTangent.RequiresTangent() : NeededCoordinateSpace.None;
  15. }
  16. }
  17. }