暫無描述
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.

UnlitInput.hlsl 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef UNIVERSAL_UNLIT_INPUT_INCLUDED
  2. #define UNIVERSAL_UNLIT_INPUT_INCLUDED
  3. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceInput.hlsl"
  4. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
  5. CBUFFER_START(UnityPerMaterial)
  6. float4 _BaseMap_ST;
  7. half4 _BaseColor;
  8. half _Cutoff;
  9. half _Surface;
  10. UNITY_TEXTURE_STREAMING_DEBUG_VARS;
  11. CBUFFER_END
  12. #ifdef UNITY_DOTS_INSTANCING_ENABLED
  13. UNITY_DOTS_INSTANCING_START(MaterialPropertyMetadata)
  14. UNITY_DOTS_INSTANCED_PROP(float4, _BaseColor)
  15. UNITY_DOTS_INSTANCED_PROP(float , _Cutoff)
  16. UNITY_DOTS_INSTANCED_PROP(float , _Surface)
  17. UNITY_DOTS_INSTANCING_END(MaterialPropertyMetadata)
  18. static float4 unity_DOTS_Sampled_BaseColor;
  19. static float unity_DOTS_Sampled_Cutoff;
  20. static float unity_DOTS_Sampled_Surface;
  21. void SetupDOTSUnlitMaterialPropertyCaches()
  22. {
  23. unity_DOTS_Sampled_BaseColor = UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float4, _BaseColor);
  24. unity_DOTS_Sampled_Cutoff = UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float , _Cutoff);
  25. unity_DOTS_Sampled_Surface = UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float , _Surface);
  26. }
  27. #undef UNITY_SETUP_DOTS_MATERIAL_PROPERTY_CACHES
  28. #define UNITY_SETUP_DOTS_MATERIAL_PROPERTY_CACHES() SetupDOTSUnlitMaterialPropertyCaches()
  29. #define _BaseColor unity_DOTS_Sampled_BaseColor
  30. #define _Cutoff unity_DOTS_Sampled_Cutoff
  31. #define _Surface unity_DOTS_Sampled_Surface
  32. #endif
  33. #endif