Unity3d envMap shaders一个环境shaders

No replies
uke
User offline. Last seen 3 天 6 小时 ago. Offline
超级管理员
Joined: 09/07/2009
Points: 2499

Shader "MY/EnvMap" {   
         
   Properties {   
      _EnvMap ("EnvMap", 2D) = "black" { TexGen SphereMap }   
   }   
      
   SubShader {   
      Pass {   
         Name "BASE"   
         BindChannels {   
            Bind "Vertex", vertex   
            Bind "normal", normal   
         }   
         SetTexture [_EnvMap] {   
            combine texture   
         }   
      }   
   }   
 
Fallback off   

Shader "MY/EnvMap" {
      
   Properties {
      _EnvMap ("EnvMap", 2D) = "black" { TexGen SphereMap }
   }
   
   SubShader {
      Pass {
         Name "BASE"
         BindChannels {
            Bind "Vertex", vertex
            Bind "normal", normal
         }
         SetTexture [_EnvMap] {
            combine texture
         }
      }
   }

Fallback off
}

Shader "MY/EnvMapGlass"   
{  
 
    Properties   
    {  
        _EnvMap ("EnvMap", 2D) = "black" { TexGen SphereMap }   
    }  
    SubShader   
    {  
        SeperateSpecular On   
        Pass   
        {  
            Name "BASE"   
            Cull Front   
            Blend One OneMinusDstColor   
            //Blend One One   
            BindChannels   
        {  
            Bind "Vertex", vertex   
            Bind "normal", normal   
        }  
           SetTexture [_EnvMap]   
        {  
            combine texture   
        }  
        }  
        Pass   
        {  
            Name "BASE"   
            ZWrite on   
            Blend One One   
            BindChannels   
            {  
                Bind "Vertex", vertex   
                Bind "normal", normal   
            }  
               SetTexture [_EnvMap]   
            {  
                combine texture   
            }  
        }  
 
    }  
 
    Fallback off