HardSurfacePro Hidden ScreenSpace Refraction.Shader 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 ScreenSpace Refraction"{
  3. //Shader Model 3
  4. SubShader {
  5. Pass
  6. {
  7. Name "SSREFRACTION"
  8. //Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"}
  9. zwrite on Ztest Lequal Cull back
  10. Blend off
  11. colormask RGBA
  12. CGPROGRAM
  13. #pragma target 3.0
  14. #define ShaderModel3
  15. #pragma vertex vert
  16. #pragma fragment frag
  17. #pragma fragmentoption ARB_precision_hint_fastest
  18. #include "UnityCG.cginc"
  19. #include "HardSurfaceProScreenSpaceRefraction.cginc"
  20. ENDCG
  21. }
  22. Pass
  23. {
  24. Name "SSREFRACTIONBUMP"
  25. //Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"}
  26. zwrite on Ztest Lequal Cull back
  27. Blend off
  28. colormask RGBA
  29. CGPROGRAM
  30. #pragma target 3.0
  31. #define ShaderModel3
  32. #pragma vertex vert
  33. #pragma fragment frag
  34. #pragma fragmentoption ARB_precision_hint_fastest
  35. #define HardsurfaceNormal
  36. #include "UnityCG.cginc"
  37. #include "HardSurfaceProScreenSpaceRefraction.cginc"
  38. ENDCG
  39. }
  40. }
  41. //Shader Model 2
  42. SubShader {
  43. Pass
  44. {
  45. Name "SSREFRACTION"
  46. //Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"}
  47. zwrite on Ztest Lequal Cull back
  48. Blend off
  49. colormask RGBA
  50. CGPROGRAM
  51. #pragma vertex vert
  52. #pragma fragment frag
  53. #pragma fragmentoption ARB_precision_hint_fastest
  54. #include "UnityCG.cginc"
  55. #include "HardSurfaceProScreenSpaceRefraction.cginc"
  56. ENDCG
  57. }
  58. Pass
  59. {
  60. Name "SSREFRACTIONBUMP"
  61. //Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "LightMode" = "Always"}
  62. zwrite on Ztest Lequal Cull back
  63. Blend off
  64. colormask RGBA
  65. CGPROGRAM
  66. #pragma vertex vert
  67. #pragma fragment frag
  68. #pragma fragmentoption ARB_precision_hint_fastest
  69. #define HardsurfaceNormal
  70. #include "UnityCG.cginc"
  71. #include "HardSurfaceProScreenSpaceRefraction.cginc"
  72. ENDCG
  73. }
  74. }
  75. Fallback "Diffuse"
  76. }