当前位置:   article > 正文

unity混合两种贴图shader_unity shader 两个贴图混合

unity shader 两个贴图混合
Shader "Blend 2 Textures, Simply Lit" { 
 
Properties {
_Color ("Color", Color) = (1,1,1)
_Blend ("Blend", Range (0,1)) = 0.5 
_MainTex ("Texture 1", 2D) = "" 
_Texture2 ("Texture 2", 2D) = ""
}
 
Category {
Material {
Ambient[_Color]
Diffuse[_Color]
}
 
// iPhone 3GS and later
SubShader {Pass {
Lighting On
SetTexture[_MainTex]
SetTexture[_Texture2] { 
ConstantColor (0,0,0, [_Blend]) 
Combine texture Lerp(constant) previous
}
SetTexture[_] {Combine previous * primary Double}
}}
 
// pre-3GS devices, including the September 2009 8GB iPod touch
SubShader {
Pass {
SetTexture[_MainTex]
SetTexture[_Texture2] {
ConstantColor (0,0,0, [_Blend])
Combine texture Lerp(constant) previous
}
}
Pass {
Lighting On
Blend DstColor SrcColor
}
}
}
 


声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/98175
推荐阅读
相关标签
  

闽ICP备14008679号