IMayRequireCameraOpaqueTexture.cs 604 B

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