No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MipmapStreamingShaderProperties.cs 1.2KB

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. namespace UnityEditor.ShaderGraph.Internal
  3. {
  4. internal static class MipmapStreamingShaderProperties
  5. {
  6. public sealed class MipmapStreamingShaderProperty : Texture2DShaderProperty
  7. {
  8. internal override void ForeachHLSLProperty(Action<HLSLProperty> action)
  9. {
  10. // No Texture2D declaration needed, already declared by internal files.
  11. // We do want to declare related mipmap streaming debugging properties, wrapped inside a macro
  12. action(new HLSLProperty(HLSLType._CUSTOM, "UNITY_TEXTURE_STREAMING_DEBUG_VARS", HLSLDeclaration.UnityPerMaterial)
  13. {
  14. customDeclaration = (ssb) =>
  15. {
  16. ssb.TryAppendIndentation();
  17. ssb.Append("UNITY_TEXTURE_STREAMING_DEBUG_VARS;");
  18. }
  19. }
  20. );
  21. }
  22. }
  23. public static readonly MipmapStreamingShaderProperty kDebugTex = new MipmapStreamingShaderProperty()
  24. {
  25. overrideReferenceName = "unity_MipmapStreaming_DebugTex",
  26. generatePropertyBlock = false,
  27. value = new SerializableTexture(),
  28. };
  29. }
  30. }