HardSurface Draw Last Transparent Diffuse.shader 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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/Draw Last/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. _MainTex ("Diffuse(RGB) Alpha(A)",2D) = "White" {}
  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 Diffuse/FORWARD"
  26. // Frontface Zprime
  27. Pass {
  28. Tags {"Queue"="Transparent+250" "IgnoreProjector"="True" "LightMode" = "Always"}
  29. zwrite on Cull back
  30. colormask 0
  31. }
  32. // Front Faces
  33. Tags {"Queue"="Transparent+250" "IgnoreProjector"="True" "RenderType"="Transparent" }
  34. UsePass "Hidden/Hardsurface Pro Front Transparent Diffuse/FORWARD"
  35. }
  36. }