I’m creating a game that involves an array of 6x6x3 semi-transparent cubes, on IOS.
Initially, I had a simple vertex-color shader with transparency, and a single point light in the scene. On iPhone 4S, this performs beautifully, and I get a steady 60fps (or near to). On iPhone 4, however, the best I could manage was around 12 fps.
The reason for using vertex-color shader was that the cubes are all different colors, and this was a way of getting them to batch: by setting the color of the cubes directly via vertex colors.
I’ve found that the problem with the iPhone 4, with this number of pixel lit cubes, is that the point light (just one) is the killer. When I replace the shader with an unlit transparent vertexcolor, and remove the light, I jump up to 30+ fps, which is at least manageable.
My question is is there any form of light that I can introduce (or some alternate strategy for keeping an array of coloured, semi-transparent cubes on screen batching, to be able to use vertex color lighting) bearing in mind, currently the vertex colors are being used to actually colour the cubes?
Unfortunately, my low poly bevelled cubes just look a million times better with a pixel light and without, look completely flat.