we launched 2d casual game at last month.
there are lots of alpha blended effects and ui controls.
triangle count is always under 1k.
we found that game is abnormally slow at iPhone4 and iPod touch 4th.
we did try anything as possible. (script, texture size, effect counts, etc…)
finally we changed “Graphics Level” to “OpenGL ES 1.x” from “OpenGL ES 2.0”
our games run faster !! (maybe twice times faster at slowest situation - many effects spawned in screen)
most shader source like this (very very simple, but just alpha blending)
Shader "UI/MaterialColor" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Particle Texture", 2D) = "white" {}
}
Category {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }
BindChannels {
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
SubShader {
Pass {
SetTexture [_MainTex] {
constantColor [_Color]
Combine texture * constant
}
}
}
}
}
maybe i think. auto generated fragment shader by unity3d engine has problem (like precision).
so we try to insert custom cg fragment shader function with fixed precision.
is idea worth a try ?
is there anything advice ?
thanks…