Advertisement
rzuf

Untitled

Apr 25th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Shader "Custom/DoubleSided" {
  2.     Properties {
  3.         _Color ("Main Color", Color) = (1,1,1,1)
  4.         _MainTex ("Base (RGB)", 2D) = "white" {}
  5.         //_BumpMap ("Bump (RGB) Illumin (A)", 2D) = "bump" {}
  6.     }
  7.     SubShader {    
  8.         //UsePass "Self-Illumin/VertexLit/BASE"
  9.         //UsePass "Bumped Diffuse/PPL"
  10.        
  11.         // Ambient pass
  12.         Pass {
  13.         Name "BASE"
  14.         Tags {"LightMode" = "Always" /* Upgrade NOTE: changed from PixelOrNone to Always */}
  15.         Color [_PPLAmbient]
  16.         SetTexture [_BumpMap] {
  17.             constantColor (.5,.5,.5)
  18.             combine constant lerp (texture) previous
  19.             }
  20.         SetTexture [_MainTex] {
  21.             constantColor [_Color]
  22.             Combine texture * previous DOUBLE, texture*constant
  23.             }
  24.         }
  25.    
  26.     // Vertex lights
  27.     Pass {
  28.         Name "BASE"
  29.         Tags {"LightMode" = "Vertex"}
  30.         Material {
  31.             Diffuse [_Color]
  32.             Emission [_PPLAmbient]
  33.             Shininess [_Shininess]
  34.             Specular [_SpecColor]
  35.             }
  36.         SeparateSpecular On
  37.         Lighting On
  38.         Cull Off
  39.         SetTexture [_BumpMap] {
  40.             constantColor (.5,.5,.5)
  41.             combine constant lerp (texture) previous
  42.             }
  43.         SetTexture [_MainTex] {
  44.             Combine texture * previous DOUBLE, texture*primary
  45.             }
  46.         }
  47.     }
  48.     FallBack "Diffuse", 1
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement