40 const float A3 = 0.10f;
41 float bumpsoffset = 0;
43 float constraintX = 17.0f;
44 float constraintY = 12.0f;
46 float BumpX = std::ceil(posx / constraintX);
47 float BumpY = std::floor(posy / constraintY);
52 float DistanceToBumpOrigin = sqrt(pow(BumpX - posx, 2) + pow(BumpY - posy, 2) );
53 float MaxDistance = 2.0;
55 if (DistanceToBumpOrigin <= MaxDistance) {
56 bumpsoffset = sin(DistanceToBumpOrigin);
59 return A3 * bumpsoffset;