HardSurfacePro Hidden Back Transparent Diffuse.shader 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 Diffuse"{
  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 HardsurfaceBackface
  12. #define ShaderModel3
  13. #pragma target 3.0
  14. #include "HardSurfaceLighting.cginc"
  15. #include "HardSurface.cginc"
  16. #pragma surface surf BlinnPhongHardsurfaceBack
  17. ENDCG
  18. }
  19. SubShader { // Shader Model 2
  20. // Back Faces pass
  21. //Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
  22. zwrite off Cull Front Ztest Lequal
  23. Blend SrcAlpha OneMinusSrcAlpha
  24. colormask RGBA
  25. CGPROGRAM
  26. #define HardsurfaceDiffuse
  27. #define HardsurfaceBackface
  28. #include "HardSurfaceLighting.cginc"
  29. #include "HardSurface.cginc"
  30. #pragma surface surf BlinnPhongHardsurfaceBackSM2
  31. ENDCG
  32. }
  33. Fallback "Diffuse"
  34. }