IMayRequireFaceSign.cs 511 B

123456789101112131415161718
  1. using UnityEditor.Graphing;
  2. namespace UnityEditor.ShaderGraph
  3. {
  4. interface IMayRequireFaceSign
  5. {
  6. bool RequiresFaceSign(ShaderStageCapability stageCapability = ShaderStageCapability.Fragment);
  7. }
  8. static class IMayRequireFaceSignExtensions
  9. {
  10. public static bool RequiresFaceSign(this ISlot slot)
  11. {
  12. var mayRequireFaceSign = slot as IMayRequireFaceSign;
  13. return mayRequireFaceSign != null && mayRequireFaceSign.RequiresFaceSign();
  14. }
  15. }
  16. }