SpeedTree7Billboard.shader 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. Shader "Universal Render Pipeline/Nature/SpeedTree7 Billboard"
  2. {
  3. Properties
  4. {
  5. _Color("Main Color", Color) = (1,1,1,1)
  6. _HueVariation("Hue Variation", Color) = (1.0,0.5,0.0,0.1)
  7. _MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
  8. _BumpMap("Normal Map", 2D) = "bump" {}
  9. _Cutoff("Alpha Cutoff", Range(0,1)) = 0.333
  10. [MaterialEnum(None,0,Fastest,1)] _WindQuality("Wind Quality", Range(0,1)) = 0
  11. }
  12. SubShader
  13. {
  14. Tags
  15. {
  16. "Queue" = "AlphaTest"
  17. "IgnoreProjector" = "True"
  18. "RenderType" = "TransparentCutout"
  19. "DisableBatching" = "LODFading"
  20. "RenderPipeline" = "UniversalPipeline"
  21. }
  22. LOD 400
  23. Pass
  24. {
  25. Name "ForwardLit"
  26. Tags { "LightMode" = "UniversalForward" }
  27. HLSLPROGRAM
  28. #pragma vertex SpeedTree7Vert
  29. #pragma fragment SpeedTree7Frag
  30. #pragma multi_compile _ _MAIN_LIGHT_SHADOWS
  31. #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE
  32. #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
  33. #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS
  34. #pragma multi_compile _ _SHADOWS_SOFT
  35. #pragma multi_compile __ BILLBOARD_FACE_CAMERA_POS
  36. #pragma multi_compile __ LOD_FADE_CROSSFADE
  37. #pragma multi_compile_fog
  38. #pragma shader_feature_local EFFECT_BUMP
  39. #pragma shader_feature_local EFFECT_HUE_VARIATION
  40. #define ENABLE_WIND
  41. #include "SpeedTree7BillboardInput.hlsl"
  42. #include "SpeedTree7BillboardPasses.hlsl"
  43. ENDHLSL
  44. }
  45. Pass
  46. {
  47. Name "ShadowCaster"
  48. Tags{"LightMode" = "ShadowCaster"}
  49. HLSLPROGRAM
  50. #pragma vertex SpeedTree7VertDepth
  51. #pragma fragment SpeedTree7FragDepth
  52. #pragma multi_compile __ BILLBOARD_FACE_CAMERA_POS
  53. #pragma multi_compile __ LOD_FADE_CROSSFADE
  54. #define ENABLE_WIND
  55. #define DEPTH_ONLY
  56. #define SHADOW_CASTER
  57. #include "SpeedTree7BillboardInput.hlsl"
  58. #include "SpeedTree7BillboardPasses.hlsl"
  59. ENDHLSL
  60. }
  61. Pass
  62. {
  63. Name "DepthOnly"
  64. Tags{"LightMode" = "DepthOnly"}
  65. ColorMask 0
  66. HLSLPROGRAM
  67. #pragma vertex SpeedTree7VertDepth
  68. #pragma fragment SpeedTree7FragDepth
  69. #pragma multi_compile __ BILLBOARD_FACE_CAMERA_POS
  70. #pragma multi_compile __ LOD_FADE_CROSSFADE
  71. #define ENABLE_WIND
  72. #define DEPTH_ONLY
  73. #include "SpeedTree7BillboardInput.hlsl"
  74. #include "SpeedTree7BillboardPasses.hlsl"
  75. ENDHLSL
  76. }
  77. }
  78. }