Ei kuvausta
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.

SpeedTree8Input.hlsl 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef UNIVERSAL_SPEEDTREE8_INPUT_INCLUDED
  2. #define UNIVERSAL_SPEEDTREE8_INPUT_INCLUDED
  3. #ifdef EFFECT_BUMP
  4. #define _NORMALMAP
  5. #endif
  6. #define _ALPHATEST_ON
  7. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  8. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceInput.hlsl"
  9. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
  10. #if defined(ENABLE_WIND) && !defined(_WINDQUALITY_NONE)
  11. #define SPEEDTREE_Y_UP
  12. #define SPEEDTREE_8_WIND 1
  13. #include "SpeedTreeWind.cginc"
  14. float _WindEnabled;
  15. UNITY_INSTANCING_BUFFER_START(STWind)
  16. UNITY_DEFINE_INSTANCED_PROP(float, _GlobalWindTime)
  17. UNITY_INSTANCING_BUFFER_END(STWind)
  18. #endif
  19. half4 _Color;
  20. int _TwoSided;
  21. #ifdef SCENESELECTIONPASS
  22. int _ObjectId;
  23. int _PassValue;
  24. #endif
  25. TEXTURE2D(_MainTex);
  26. SAMPLER(sampler_MainTex);
  27. float4 _MainTex_TexelSize;
  28. #ifdef EFFECT_EXTRA_TEX
  29. sampler2D _ExtraTex;
  30. #else
  31. half _Glossiness;
  32. half _Metallic;
  33. #endif
  34. #ifdef EFFECT_HUE_VARIATION
  35. half4 _HueVariationColor;
  36. #endif
  37. #ifdef EFFECT_BILLBOARD
  38. half _BillboardShadowFade;
  39. #endif
  40. #ifdef EFFECT_SUBSURFACE
  41. sampler2D _SubsurfaceTex;
  42. half4 _SubsurfaceColor;
  43. half _SubsurfaceIndirect;
  44. #endif
  45. // Shadow Casting Light geometric parameters. These variables are used when applying the shadow Normal Bias and are set by UnityEngine.Rendering.Universal.ShadowUtils.SetupShadowCasterConstantBuffer in com.unity.render-pipelines.universal/Runtime/ShadowUtils.cs
  46. // For Directional lights, _LightDirection is used when applying shadow Normal Bias.
  47. // For Spot lights and Point lights, _LightPosition is used to compute the actual light direction because it is different at each shadow caster geometry vertex.
  48. float3 _LightDirection;
  49. float3 _LightPosition;
  50. #define GEOM_TYPE_BRANCH 0
  51. #define GEOM_TYPE_FROND 1
  52. #define GEOM_TYPE_LEAF 2
  53. #define GEOM_TYPE_FACINGLEAF 3
  54. #define _Surface 0.0 // Speed Trees are always opaque
  55. UNITY_TEXTURE_STREAMING_DEBUG_VARS;
  56. #endif