I’m working on my first iPhone/iPad game. It will be endless runner game for iPhone/iPad.
I need your comments about distant for in the game. I’ve read that it’s better to use a set of planes with transparency shader for achieve such a result. So, I tried to do it. Please, take a look at the attached image for better understand.
So, I need your help about how to get such a smooth looking result like in the samples I sent you (Temple Run and Subway Surfers)?
Just to use more planes? Is it the solution? Also did I do right while chose Transparency shader for the planes? I didn’t find a mobile transparency shader in the standard shaders list.
Also I wonder how the guys from Subway Surfers achieve such a cool looking bending view from the camera? It look like some kind of camera lens distortion.
Planes probably are not the right solution. You will get loads of overdraw which would kill performance on mobile. Plus you will need lots of planes to get a smooth effect.
Its better to use either Unity’s built in fog or use custom shaders that work out the distance a vertex is away from the camera and then apply a fog colour.
I’ve found this recommendation from ShadowGun creators about fog: Fog effects - avoided. Single planes that fade in and out are used to achieve cinematic fog effects without actually rendering any fog. This is faster because the planes are few and far between, and it means that fog doesn’t have to be calculated on every pixel and in every shader.