I profile my game use Adreno Profiler and find lightmaped static model’s vertex data have normal attribute.
Lighting mode is Subtractive. Non-Directional. Directional Light is baked.novertexlights is set to surfaceshader. So there should no normal used in somewhere.
When I use Unity4.7,the normal data not used on mobile.
The surface shader is very simple
struct Input {
float2 uv_MainTex;
};
void surf(Input IN, inout SurfaceOutput o) {
fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb;
o.Alpha = c.a;
}
inline fixed4 LightingTestLambert(SurfaceOutput s, fixed3 lightDir, fixed atten)
{
fixed diff = max(0, dot(s.Normal, lightDir));
fixed4 c;
c.rgb = s.Albedo * _LightColor0.rgb * (diff * atten);
c.a = s.Alpha;
return c;
}
And I looked generated code, even no normal used, worldNormal always compute.
Is there anyway I can save this operate and not export normal data when build apk.