HardSurface Pro Draw First Transparent Bump.shader 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //Hard Surface Shader Package, Written for the Unity engine by Bruno Rime: http://www.behance.net/brunorime brunorime@gmail.com
  2. Shader "HardSurface/Hardsurface Pro/Draw First/Transparent Bump"{
  3. Properties {
  4. _Color ("Main Color", Color) = (1,1,1,1)
  5. _SpecColor ("Specular Color", Color) = (1, 1, 1, 1)
  6. _Shininess ("Shininess", Range (0.01, 3)) = 1.5
  7. _Gloss("Gloss", Range (0.00, 1)) = .5
  8. _Reflection("Reflection", Range (0.00, 1)) = 0.5
  9. _Cube ("Reflection Cubemap", Cube) = "Black" { TexGen CubeReflect }
  10. _FrezPow("Fresnel Reflection",Range(0,1024)) = 512
  11. _FrezFalloff("Fresnal/EdgeAlpha Falloff",Range(0,10)) = 4
  12. _EdgeAlpha("Edge Alpha",Range(0,1)) = 0
  13. _Metalics("Metalics",Range(0,1)) = .5
  14. _Density("Density / Refraction", Range(-0.5,0.5)) = .001
  15. _MainTex ("Diffuse(RGB) Alpha(A)",2D) = "White" {}
  16. _BumpMap ("Normalmap", 2D) = "Bump" {}
  17. }
  18. SubShader {
  19. // Zprime backfaces
  20. Pass {
  21. Tags {"Queue"="Transparent-250" "IgnoreProjector"="True" "LightMode" = "Always"}
  22. zwrite on Cull front
  23. colormask 0
  24. }
  25. // Backfaces
  26. Tags {"Queue"="Transparent-250" "IgnoreProjector"="True" "RenderType"="Transparent" }
  27. UsePass "Hidden/Hardsurface Pro Back Transparent Bump/FORWARD"
  28. // Refraction Capture / Will self refract with capture placed here
  29. GrabPass {
  30. Tags {"LightMode" = "Always"}
  31. }
  32. // Refraction & Frontface Zprime
  33. Tags {"Queue"="Transparent-250" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"}
  34. UsePass "Hidden/Hardsurface Pro ScreenSpace Refraction/SSREFRACTIONBUMP"
  35. // Front Faces
  36. Tags {"Queue"="Transparent-250" "IgnoreProjector"="True" "RenderType"="Transparent" }
  37. UsePass "Hidden/Hardsurface Pro Front Transparent Bump/FORWARD"
  38. // Reflection Capture / Will self reflect with capture placed here
  39. GrabPass {
  40. Tags {"LightMode" = "Always"}
  41. }
  42. // Reflection Pass
  43. Tags {"Queue"="Transparent-250" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"}
  44. UsePass "Hidden/Hardsurface Pro ScreenSpace Reflection/SSREFLECTIONBUMP"
  45. }
  46. }