OpenGL ES 2.0 vs 1.x performance

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… :smile:

Those are fixed function shaders. They are compatible with OpenGL ES 1.X. When an iOS device sees those shaders it “automagically” translates them to something that works but also, performs horribly.

You should convert those to CG shaders. Heck even surface shaders might perform better.

Perhaps you are going over the fill rate? iPhone 4 is notorious for having poor performance in this area.

CG optimised shaders in my signature are faster than unity’s mobile shaders. Yes I know I go on about echologin’s shader pack but I do it for two reasons:

  1. it’s cheap enough to take the risk
  2. they’re well written enough for you to actually learn cg. He’s stripped the bullshit layers people add to shaders for no reason and given you the bare bones shaders, so you’re like “ah, its really this easy”.

yes. sometimes game is going over the fill rate (alpha blended effects are spawned by every finger touch.)

if player’s finger is fast, game is much more slower. (i think that our game is not familiar with mobile device :frowning: )

we can’t try to reduce effect any more.

we trying to make custom cg shader !!

thanks for replies.