查看: 1547|回复: 1
打印 上一主题 下一主题

简单的环境shader

[复制链接]

5552

主题

2

听众

8万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
11

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

跳转到指定楼层
楼主
发表于 2012-3-8 12:10:38 |只看该作者 |倒序浏览
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   
}  
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

797

主题

1

听众

1万

积分

资深设计师

Rank: 7Rank: 7Rank: 7

纳金币
5568
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2012-3-8 17:17:20 |只看该作者
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2024-9-21 04:23 , Processed in 0.110092 second(s), 31 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部