HardSurfacePro Hidden Back Transparent Specular.shader 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //Hard Surface Shader Package, Written for the Unity engine by Bruno Rime: http://www.behance.net/brunorime brunorime@gmail.com
  2. Shader "Hidden/Hardsurface Pro Back Transparent Specular"{
  3. SubShader { // Shader Model 3
  4. // Back Faces pass
  5. //Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
  6. zwrite off Cull Front Ztest Lequal
  7. Blend SrcAlpha OneMinusSrcAlpha
  8. colormask RGBA
  9. CGPROGRAM
  10. #define HardsurfaceDiffuse
  11. #define HardsurfaceNormal
  12. #define HardsurfaceSpecular
  13. #define HardsurfaceBackface
  14. #define ShaderModel3
  15. #pragma target 3.0
  16. #include "HardSurfaceLighting.cginc"
  17. #include "HardSurface.cginc"
  18. #pragma surface surf BlinnPhongHardsurfaceBack
  19. ENDCG
  20. }
  21. SubShader { // Shader Model 2
  22. // Back Faces pass
  23. //Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
  24. zwrite off Cull Front Ztest Lequal
  25. Blend SrcAlpha OneMinusSrcAlpha
  26. colormask RGBA
  27. CGPROGRAM
  28. #define HardsurfaceDiffuse
  29. #define HardsurfaceNormal
  30. #define HardsurfaceSpecular
  31. //#define HardsurfaceBackface // out of arithmatic calculations 67 :(
  32. #include "HardSurfaceLighting.cginc"
  33. #include "HardSurface.cginc"
  34. #pragma surface surf BlinnPhongHardsurfaceBackSM2
  35. ENDCG
  36. }
  37. Fallback "Diffuse"
  38. }