UniversalDOTSInstancing.hlsl 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef UNIVERSAL_DOTS_INSTANCING_INCLUDED
  2. #define UNIVERSAL_DOTS_INSTANCING_INCLUDED
  3. #ifdef UNITY_DOTS_INSTANCING_ENABLED
  4. #undef unity_ObjectToWorld
  5. #undef unity_WorldToObject
  6. // TODO: This might not work correctly in all cases, double check!
  7. UNITY_DOTS_INSTANCING_START(BuiltinPropertyMetadata)
  8. UNITY_DOTS_INSTANCED_PROP(float3x4, unity_ObjectToWorld)
  9. UNITY_DOTS_INSTANCED_PROP(float3x4, unity_WorldToObject)
  10. UNITY_DOTS_INSTANCED_PROP(float4, unity_LODFade)
  11. UNITY_DOTS_INSTANCED_PROP(float4, unity_WorldTransformParams)
  12. UNITY_DOTS_INSTANCED_PROP(float4, unity_LightData)
  13. UNITY_DOTS_INSTANCED_PROP(float2x4, unity_LightIndices)
  14. UNITY_DOTS_INSTANCED_PROP(float4, unity_ProbesOcclusion)
  15. UNITY_DOTS_INSTANCED_PROP(float4, unity_SpecCube0_HDR)
  16. UNITY_DOTS_INSTANCED_PROP(float4, unity_LightmapST)
  17. UNITY_DOTS_INSTANCED_PROP(float4, unity_LightmapIndex)
  18. UNITY_DOTS_INSTANCED_PROP(float4, unity_DynamicLightmapST)
  19. UNITY_DOTS_INSTANCED_PROP(float4, unity_SHAr)
  20. UNITY_DOTS_INSTANCED_PROP(float4, unity_SHAg)
  21. UNITY_DOTS_INSTANCED_PROP(float4, unity_SHAb)
  22. UNITY_DOTS_INSTANCED_PROP(float4, unity_SHBr)
  23. UNITY_DOTS_INSTANCED_PROP(float4, unity_SHBg)
  24. UNITY_DOTS_INSTANCED_PROP(float4, unity_SHBb)
  25. UNITY_DOTS_INSTANCED_PROP(float4, unity_SHC)
  26. UNITY_DOTS_INSTANCING_END(BuiltinPropertyMetadata)
  27. // Note: Macros for unity_ObjectToWorld and unity_WorldToObject are declared in UnityInstancing.hlsl
  28. // because of some special handling
  29. #define unity_LODFade UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_LODFade)
  30. #define unity_WorldTransformParams UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_WorldTransformParams)
  31. #define unity_LightData UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_LightData)
  32. #define unity_LightIndices UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float2x4, Metadata_unity_LightIndices)
  33. #define unity_ProbesOcclusion UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_ProbesOcclusion)
  34. #define unity_SpecCube0_HDR UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_SpecCube0_HDR)
  35. #define unity_LightmapST UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_LightmapST)
  36. #define unity_LightmapIndex UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_LightmapIndex)
  37. #define unity_DynamicLightmapST UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_DynamicLightmapST)
  38. #define unity_SHAr UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_SHAr)
  39. #define unity_SHAg UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_SHAg)
  40. #define unity_SHAb UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_SHAb)
  41. #define unity_SHBr UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_SHBr)
  42. #define unity_SHBg UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_SHBg)
  43. #define unity_SHBb UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_SHBb)
  44. #define unity_SHC UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4, Metadata_unity_SHC)
  45. #endif
  46. #endif