How did Chameleon Run managed to have Depth of Field and mirror effect without affecting framerate?

Hey guys, I played game Chameleon Run and it’s beautiful but how did it manage to have Depth of Field, and mirror effect and other image effects(not sure if it has bloom and ambient occlusion) without affecting the games framerate?

You can find the game here

It’s all about how much time you want to dedicate to effects / post. Looking at this game the art is great, but it’s also simple. So to start with the base game probably has a low ms cost. They have budgeted this so they can afford a second camera (for planer ground reflections).

When it comes to the DOF, it could either be a simple DOF that has fixed layers that blur a certain amount per depth layer, or real DOF. It just depends on how much time they had spare after the rest of the scene rendering.

When it comes to game development it’s all about cost. You CAN have cool visual effects, but you have to decide about how many ms you want to dedicate to them.

3 Likes

That DoF looks like a simple Gaussian blur (which isn’t real DoF), and you could get away with doing a simpler depth check than normal for that sort of game where you can put stuff in layers. Because of the gaussian DoF, you could use it as a bloom texture as well, so free bloom (one add operation), and combine it with vignette in the same pass, any mobile can do a combined vignette.

Not sure about the reflections but the game does look cheap enough to be able to get away with a second camera for them. Or maybe it’s as simple as inverting the blurred texture and putting it on the bottom half of the screen, and drawing it first? Idk.

1 Like

Thanks for the answers guys!!

Actually, if it’s still relevant to someone visitting, Jan (the creator of Chameleon Run) had a talk about this exact topic at the end of 2016. You can find it here: GDS 2016: Jan Ilavský - Za oponu vývoje Chameleon Run (přednáška je v angličtině) | GAMES.CZ , it’s the same technique as demonstrated in 2012 here: DOF on IOS, How we did it (mini post mortem) - Unity Engine - Unity Discussions , so it is very usable for less powerful devices. Might not be a ‘real DoF’, but for mobile devices it’s a great technique to know about for sure.

1 Like

This exact effect/method is why I question so fiercely the reason Unity dropped Blur from the Post Processing Stack. It seems like a massive oversight.