Hey just recently when I build my game to iphone 4, the frame rate would only be around 25 fps. I had it at 50-55 fps before this, it just randomly started happening. I started disabling disabling different parts of the environment and building to track it down, but I turned off everything except the main character and the sky background, which is a plane (4 verts, 2 tris), with a sky texture on it (imported as a texture mac size 1025 format Compressed 512x512). I turned off the plane so just my character was in and it shot back up to 60. Why would one plane and texture kill the frame rate so bad?
What shader is on the plane? thats the important thing. A quad covering the screen will increase your framerate with the right shader since it’ll cull geometry.
But, need to know what shader you’re using. It should be a mobile/unlit shader.
Originally I was using Mobile/Unlit(Supports Lightmapping). But i also tried Mobile/Diffuse and Mobile/VertexLit, but no luck.
I fear thats false information, fundamentally wrong information actually.
Only on iOS / Galaxy S / Nexus S. On the desktop and other mobiles it will not cull anything unless its static and you use Occlusion Culling.
For a drop of 30 FPS though you either need pretty weak hardware or a very consuming plane material. From what you mentioned though it would nearly need to be a very old intel onboard or a mobile and either a transparent shader or a vertex color shader with transparent vertex colors, in both cases the fillrate hit is pretty high from transparent fullscreen.
Don’t forget that if you have nothing in scene and then add something, this will always cause a drop. this does not matter, what matters if it drops in the same way when you add the second and third thing. The initial hit is often bigger as ‘gpu does nothing’ is a pretty big difference to ‘gpu renders a fullscreen quad’ for mobiles
What shader are you using for the texture? That can make a massive difference. You could have fill rate problems if there is any transparency.
Edit: Ignore this post, similar answer appeared while writing.
I was wondering if the clear flags on the camera would do anything. Because on my other scene I have it to depth only, but in the scene i tested i realized it was on skybox even though i dont have one. Could that be it?
I was referring to iOS, where my statement is correct. Why was I referring to iOS? because the author said he is testing it on iPhone 4.
The problem is you are claiming it’s a 30fps loss. That is huge, and does not make sense. Are you perceiving this drop, or measuring it? How are you measuring it?
Thing is I had my whole level with character running at 50-55, depending on the objects moving because they are using physics. By it would never go under 50. I put this one plane in (lowest poly plane my modellers could make), with a mobile, non transparent shader and it dropped it to under 30. I used the same shader on every other object in the level. And the frame rate i mentioned is from the iphone 4, not editor.
i have found if your using a fps control it has a “use fixed update” setting that if it was on caused huge frame rate hits. (located in the Character motor (script) not sure if this is your prob but could be i guess
no im using all my own control scripts. Thanks anyway though.