Realistic cloth and foliage effects can be very calculation intensive, and therefore they are notvery common in mobile games. Using effects that are both visually appealing and light onperformance could greatly improve the look of mobile games that usually don’t have effects likethese. I chose to limit the scope of the project to these cases.● Cloth or foliage blowing in the wind● Foliage reacting to touch, like a player walking through it● Cloth or foliage reacting to bulletsIs it possible to, instead of using expensive physics calculations to simulate these effects, justapproximate the ‘look’ of it but still base it on reality?ResultIt is helpful to start with a look at physics even when writing simplified, non-physical effects. Byknowing exactly what causes the look you are after it’s much easier to mimic. I discovered thatmaterial stiffness is the most important property to define how a branch, some grass or somehanging cloth reacts to external forces.I decided to go with a shader based solution for all three effects, because of the performancebenefits over joints and vertex simulations. The wind shader is a common technique using sinewaves to make an offset to the vertex positions before drawing to the screen. The shader forfoliage reacting to touch builds on this by supplying it with a player position and movementvelocity. This is then used to make additional changes depending on how far away the player is.The shader reacting to bullets is very similar, but instead of player position it is supplied withbullet positions along the shooting vector. The vertices are the displaced by how close they areto this position creating an effect of the cloth stretching and then falling back in the direction ofthe shot.The first two effects worked out well, with good performance and a natural look. The shootingeffect though needs further improvement to be used in a game. Overall I believe shader trickslike these can be very useful in mobile games that want some extra detail but can’t afford vertexsimulation.