Added some rendering math.