Решил использовать двухпроходный шейдер для двухтекстурных видеокарт без использования Cg вставок.
Получилось следующее:
Shader "Divan/VertexLit" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_SpecColor ("Spec Color", Color) = (1,1,1,1)
_Shininess ("Shininess", Range (0.01, 1)) = 0.7
_MainTex ("Base (RGB)", 2D) = "white" {}
_LightMap ("Lightmap (RGB)", 2D) = "lightmap" { LightmapMode }
_LightMap2 ("Lightmap2 (RGB)", 2D) = "lightmap" { LightmapMode }
_LightMapT ("LightmapT", Range (0.0, 1)) = 0.0
}
// ------------------------------------------------------------------
// Two texture cards
SubShader {
LOD 100
Tags { "RenderType"="Opaque" }
Pass {
Name "LM"
BindChannels {
Bind "Vertex", vertex
Bind "texcoord1", texcoord0 // lightmap uses 2nd uv
Bind "texcoord1", texcoord1 // lightmap2 uses 2nd uv
}
SetTexture [_LightMap] {
combine texture
}
SetTexture [_LightMap2] {
constantColor (0.5,0.5,0.5,[_LightMapT])
combine texture lerp(constant) previous
}
}
Pass {
Name "COLOR"
Tags {"LightMode" = "Vertex"}
Material {
Diffuse [_Color]
Shininess [_Shininess]
Specular [_SpecColor]
}
Lighting On
SeparateSpecular On
ZWrite Off
Offset 0, -1
Blend DstColor Zero
BindChannels {
Bind "Vertex", vertex
Bind "normal", normal
Bind "texcoord", texcoord0 // main uses 1st uv
}
SetTexture [_MainTex] {
ConstantColor [_Color]
combine texture * Constant, texture
matrix [_MainTexMatrix]
}
}
}
Fallback "VertexLit"
}
Теперь есть поддержка старых видеокарт и блики исправились.