HardSurface Pro Transparent Diffuse.shader 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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/Transparent Diffuse"{
  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. }
  17. SubShader {
  18. // Zprime backfaces
  19. Pass {
  20. Tags {"Queue"="Geometry" "IgnoreProjector"="True" "LightMode" = "Always"}
  21. zwrite on Cull front
  22. colormask 0
  23. }
  24. // Backfaces
  25. Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
  26. UsePass "Hidden/Hardsurface Pro Back Transparent Diffuse/FORWARD"
  27. // Refraction Capture / Will self refract with capture placed here
  28. GrabPass {
  29. Tags {"LightMode" = "Always"}
  30. }
  31. // Refraction & Frontface Zprime
  32. Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"}
  33. UsePass "Hidden/Hardsurface Pro ScreenSpace Refraction/SSREFRACTION"
  34. // Front Faces
  35. Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
  36. UsePass "Hidden/Hardsurface Pro Front Transparent Diffuse/FORWARD"
  37. // Reflection Capture / Will self reflect with capture placed here
  38. GrabPass {
  39. Tags {"LightMode" = "Always"}
  40. }
  41. // Reflection Pass
  42. Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"}
  43. UsePass "Hidden/Hardsurface Pro ScreenSpace Reflection/SSREFLECTION"
  44. }
  45. }