unity混合两种贴图shader
2015-04-17 12:33
281 查看
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
}
}
}
}
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
}
}
}
}
相关文章推荐
- unity shader学习笔记(十一)——Unity中的透明效果之ShaderLab中的混合命令
- [置顶] 神临的Unity shader 学习之法线贴图(三)
- untiy3d 混合贴图shader
- Unity 检查带有默认贴图的shader
- shader学习基础之十一实现纹理的缩放平移和旋转,以及用c#代码合并两种贴图并且控制位置
- Unity-Shader之法线贴图使用注意事项
- Unity Shader-法线贴图(Normal Map)与视差贴图(Parallax Map)
- Unity Shader Example 5 (地形混合)
- UnityShader初级篇——透明度混合
- 从一个shader剖析unity混合光照和pbr
- 【Unity Shader】4.Unity Shader基本知识学习(混合 Blending )
- Unity 之 Shader Blend 混合操作 - 八
- Unity3D ShaderLab 混合两张贴图(Blend)
- 【浅墨Unity3D Shader编程】之五 圣诞夜篇: Unity中Shader的三种形态对比&混合操作合辑
- 【浅墨Unity3D Shader编程】之五 圣诞夜篇: Unity中Shader的三种形态对比&混合操作合辑
- 【猫猫的Unity Shader之旅】之混合效果
- unity shader 实现常见的混合效果
- Unity Shader:三向贴图(Tri-planar mapping)---解决地形拉伸贴图变形以及贴图边缘的缝隙问题
- Unity之Shader过滤掉不带Alpha通道贴图的背景颜色 - 四
- 【Unity Shader】 CubeMap(立方体贴图)