Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2022
13
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED)
  2. StructuredBuffer<float3> _Positions;
  3. StructuredBuffer<float3> _Colors;
  4. #endif
  5.  
  6. float _Step;
  7.  
  8. void ConfigureProcedural () {
  9. #if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED)
  10. float3 position = _Positions[unity_InstanceID];
  11. float3 color = _Colors[unity_InstanceID];
  12.  
  13. unity_ObjectToWorld = 0.0;
  14. unity_ObjectToWorld._m03_m13_m23_m33 = float4(position, 1.0);
  15. unity_ObjectToWorld._m00_m11_m22 = _Step;
  16. #endif
  17. }
  18.  
  19. void ShaderGraphFunction_float (float3 InPosition, float3 InColor, out float3 OutPosition, out float3 OutColor) {
  20. OutPosition = InPosition;
  21. OutColor = InColor;
  22. }
  23.  
  24. void ShaderGraphFunction_half (float3 InPosition, float3 InColor, out float3 OutPosition, out float3 OutColor) {
  25. OutPosition = InPosition;
  26. OutColor = InColor;
  27. }
Advertisement
RAW Paste Data Copied
Advertisement