//Hard Surface Shader Package, Written for the Unity engine by Bruno Rime: http://www.behance.net/brunorime brunorime@gmail.com Shader "HardSurface/Hardsurface Pro/Cut Out/Diffuse"{ Properties { _Color ("Main Color", Color) = (1,1,1,1) _SpecColor ("Specular Color", Color) = (1, 1, 1, 1) _Shininess ("Shininess", Range (0.01, 3)) = 1.5 _Gloss("Gloss", Range (0.00, 1)) = .5 _Reflection("Reflection", Range (0.00, 1)) = 0.5 _Cube ("Reflection Cubemap", Cube) = "Black" { TexGen CubeReflect } _FrezPow("Fresnel Reflection",Range(0,2)) = .25 _FrezFalloff("Fresnal/EdgeAlpha Falloff",Range(0,10)) = 4 _Metalics("Metalics",Range(0,1)) = .5 _Density("Density / Refraction", Range(0,1)) = .12 _Cutoff ("Alpha cutoff", Range(0,1)) = 0.5 _MainTex ("Diffuse(RGB) Alpha(A)",2D) = "White" {} } SubShader { // Zprime backfaces Pass { Tags {"Queue" = "Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"} zwrite on Cull front colormask 0 Lighting Off Alphatest Greater [_Cutoff] SetTexture [_MainTex] { combine texture } } //// Backfaces Tags {"Queue" = "Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} UsePass "Hidden/Hardsurface Pro Back Cut Out Diffuse/FORWARD" // Refraction Capture / Will self refract with capture placed here GrabPass { Tags {"LightMode" = "Always"} } // Refraction & Frontface Zprime Tags {"Queue" = "Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"} UsePass "Hidden/Hardsurface Pro ScreenSpace Refraction/SSREFRACTIONCUTOUT" // Front Faces Tags {"Queue" = "Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} UsePass "Hidden/Hardsurface Pro Front Cut Out Diffuse/FORWARD" // Reflection Capture / Will self reflect with capture placed here //ReflectGrab// GrabPass { //ReflectGrab// Tags {"LightMode" = "Always"} //ReflectGrab//} // Reflection Pass Tags {"Queue" = "Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"} UsePass "Hidden/Hardsurface Pro ScreenSpace Reflection/SSREFLECTIONCUTOUT" } //FallBack "Transparent/Cutout/VertexLit" }