UniversalFields.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using UnityEditor.ShaderGraph;
  2. namespace UnityEditor.Rendering.Universal.ShaderGraph
  3. {
  4. internal static class UniversalFields
  5. {
  6. #region Tags
  7. public const string kFeatures = "features";
  8. public const string kSurfaceType = "SurfaceType";
  9. public const string kBlendMode = "BlendMode";
  10. #endregion
  11. #region Fields
  12. // still used by sprite targets (NOT used by lit/unlit targets anymore)
  13. public static FieldDescriptor SurfaceOpaque = new FieldDescriptor(kSurfaceType, "Opaque", "_SURFACE_TYPE_OPAQUE 1");
  14. public static FieldDescriptor SurfaceTransparent = new FieldDescriptor(kSurfaceType, "Transparent", "_SURFACE_TYPE_TRANSPARENT 1");
  15. // still used by sprite targets (NOT used by lit/unlit targets anymore)
  16. public static FieldDescriptor BlendAdd = new FieldDescriptor(kBlendMode, "Add", "_BLENDMODE_ADD 1");
  17. public static FieldDescriptor BlendPremultiply = new FieldDescriptor(kBlendMode, "Premultiply", "_ALPHAPREMULTIPLY_ON 1");
  18. public static FieldDescriptor BlendMultiply = new FieldDescriptor(kBlendMode, "Multiply", "_BLENDMODE_MULTIPLY 1");
  19. // Used by lit/unlit targets
  20. public static FieldDescriptor Normal = new FieldDescriptor(string.Empty, "Normal", "_NORMALMAP 1");
  21. public static FieldDescriptor NormalDropOffTS = new FieldDescriptor(string.Empty, "NormalDropOffTS", "_NORMAL_DROPOFF_TS 1");
  22. public static FieldDescriptor NormalDropOffOS = new FieldDescriptor(string.Empty, "NormalDropOffOS", "_NORMAL_DROPOFF_OS 1");
  23. public static FieldDescriptor NormalDropOffWS = new FieldDescriptor(string.Empty, "NormalDropOffWS", "_NORMAL_DROPOFF_WS 1");
  24. #endregion
  25. // A predicate is field that has a matching template command, for example: $<name> <content>
  26. // It is only used to enable/disable <content> in the tempalate
  27. #region Predicates
  28. //public static FieldDescriptor PredicateClearCoat = new FieldDescriptor(string.Empty, "ClearCoat", "_CLEARCOAT 1");
  29. #endregion
  30. }
  31. }