I'm currently migrating a project from Unity iPhone 1.7 to Unity 3.1 and I'm having some issues with the shader below.
Shader "iPhone/Reflection/SphereMapped" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_SpecColor ("Spec Color", Color) = (1,1,1,1)
_Shininess ("Shininess", Range (0.03, 1)) = 0.7
_MainTex ("Base (RGB) RefStrength (A)", 2D) = "white" {}
_Sphere ("Reflection SphereMap", 2D) = "white" { TexGen SphereMap }
}
SubShader {
Pass {
Blend AppSrcAdd AppDstAdd
Tags {"Queue"="Geometry" "LightMode"="Always"}
Material {
Diffuse[_Color]
Ambient(1,1,1,1)
Shininess[_Shininess]
Specular[_SpecColor]
}
Lighting On
SeparateSpecular On
SetTexture [_MainTex] {
combine texture * primary QUAD, texture * primary
}
SetTexture [_Sphere] {
combine texture * primary
}
}
}
Fallback off
}
Every time I import the shader into Unity 3.1, Unity comments out the Blend command with this message.
/* Upgrade NOTE: commented out, possibly part of old style per-pixel lighting: Blend AppSrcAdd AppDstAdd */
This is causing the shader to basically ignore the first SetTexture command and is only displaying the result of the second SetTexture command.
Does anyone have any ideas on why this would be happening, or if this is just a bug I've stumbled across?