纳金网

标题: 简单的环境shader [打印本页]

作者: 会飞的鱼    时间: 2012-3-8 12:10
标题: 简单的环境shader
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   
}  
作者: 彬彬    时间: 2012-3-8 17:17





欢迎光临 纳金网 (http://wwww.narkii.com/club/) Powered by Discuz! X2.5