HardSurface Pro Draw First Transparent.shader 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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"{
  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)) = 1
  13. _Metalics("Metalics",Range(0,1)) = .5
  14. _Density("Density / Refraction", Range(-0.5,0.5)) = .001
  15. }
  16. SubShader {
  17. // Zprime backfaces
  18. Pass {
  19. Tags {"Queue"="Transparent-250" "IgnoreProjector"="True" "LightMode" = "Always"}
  20. zwrite on Cull front
  21. colormask 0
  22. }
  23. // Backfaces
  24. Tags {"Queue"="Transparent-250" "IgnoreProjector"="True" "RenderType"="Transparent" }
  25. UsePass "Hidden/Hardsurface Pro Back Transparent/FORWARD"
  26. // Refraction Capture / Will self refract with capture placed here
  27. GrabPass {
  28. Tags {"LightMode" = "Always"}
  29. }
  30. // Refraction & Frontface Zprime
  31. Tags {"Queue"="Transparent-250" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"}
  32. UsePass "Hidden/Hardsurface Pro ScreenSpace Refraction/SSREFRACTION"
  33. // Front Faces
  34. Tags {"Queue"="Transparent-250" "IgnoreProjector"="True" "RenderType"="Transparent" }
  35. UsePass "Hidden/Hardsurface Pro Front Transparent/FORWARD"
  36. // Reflection Capture / Will self reflect with capture placed here
  37. GrabPass {
  38. Tags {"LightMode" = "Always"}
  39. }
  40. // Reflection Pass
  41. Tags {"Queue"="Transparent-250" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"}
  42. UsePass "Hidden/Hardsurface Pro ScreenSpace Reflection/SSREFLECTION"
  43. }
  44. }