shader "Test/FF1"{
properties{
_Color("颜色", color) = (1, 1, 0, 1)
_Ambient("环境", color) = (0.3, 0.3, 0.3, 0.3)
_Specular("高光", color) = (1, 1, 1, 1)
_Shininess("发光", range(0, 10)) = 3
_Emission("自发光", color) = (0, 1, 1, 1)
_Texture("贴图", 2d) = "??"{}
_Constant("ConstantColor", color) = (1, 1, 1, 1)
_CombineTexture("叠加的贴图", 2d) = ""{}
}
subshader{
tags{"Queue" = "Transparent"}
pass{
Blend SrcAlpha OneMinusSrcAlpha
// color(0, 1, 1, 1)
// color[_Color]
material{
diffuse[_Color]
ambient[_Color]
specular[_Specular]
shininess[_Shininess]
emission[_Emission]
}
lighting on
separatespecular on
settexture[_Texture]
{
combine texture * primary double
}
settexture[_CombineTexture]{
// 使用逗号后的texture作为输出的alpha值
// combine texture * previous quad, texture
constantcolor[_Constant]
combine texture * previous quad, texture * constant
}
}
}
}