ShaderParams.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /// <summary>
  2. /// Shiny SSRR - Screen Space Reflections for URP - (c) 2021 Kronnect
  3. /// </summary>
  4. using UnityEngine;
  5. namespace ShinySSRR {
  6. public static class ShaderParams {
  7. // input textures
  8. public static int MainTex = Shader.PropertyToID("_MainTex");
  9. public static int NoiseTex = Shader.PropertyToID("_NoiseTex");
  10. public static int BumpMap = Shader.PropertyToID("_BumpMap");
  11. public static int BumpMap_ST = Shader.PropertyToID("_BumpMap_ST");
  12. public static int BaseMap_ST = Shader.PropertyToID("_BaseMap_ST");
  13. // shader uniforms
  14. public static int Color = Shader.PropertyToID("_Color");
  15. public static int BaseColor = Shader.PropertyToID("_BaseColor");
  16. public static int Smoothness = Shader.PropertyToID("_Smoothness");
  17. public static int SmoothnessMap = Shader.PropertyToID("_SmoothnessMap");
  18. public static int MetallicGlossMap = Shader.PropertyToID("_MetallicGlossMap");
  19. public static int MaterialData = Shader.PropertyToID("_MaterialData");
  20. public static int SSRSettings = Shader.PropertyToID("_SSRSettings");
  21. public static int SSRSettings2 = Shader.PropertyToID("_SSRSettings2");
  22. public static int SSRSettings3 = Shader.PropertyToID("_SSRSettings3");
  23. public static int SSRSettings4 = Shader.PropertyToID("_SSRSettings4");
  24. public static int SSRSettings5 = Shader.PropertyToID("_SSRSettings5");
  25. public static int SSRBlurStrength = Shader.PropertyToID("_SSRBlurStrength");
  26. public static int WorldToViewDir = Shader.PropertyToID("_WorldToViewDir");
  27. public static int MinimumBlur = Shader.PropertyToID("_MinimumBlur");
  28. // targets
  29. public static int ColorTex = Shader.PropertyToID("_ColorTex");
  30. public static int RayCast = Shader.PropertyToID("_RayCastRT");
  31. public static int BlurRT = Shader.PropertyToID("_BlurRT");
  32. public static int ReflectionsTex = Shader.PropertyToID("_ReflectionsRT");
  33. public static int NaNBuffer = Shader.PropertyToID("_NaNBuffer");
  34. // shader keywords
  35. public const string SKW_JITTER = "SSR_JITTER";
  36. public const string SKW_NORMALMAP = "SSR_NORMALMAP";
  37. public const string SKW_DENOISE = "SSR_DENOISE";
  38. public const string SKW_SMOOTHNESSMAP = "SSR_SMOOTHNESSMAP";
  39. public const string SKW_REFINE_THICKNESS = "SSR_THICKNESS_FINE";
  40. }
  41. }