Unity3d envMap shaders一个环境shaders
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
}
