Mediation isn't necessarily required, but it's highly recommended because most cases that go to mediation will end in a settlement. If one party requests that mediation be ordered, the court will most likely order it. So, if one of you wants to mediate, it will probably end up being court ordered.
In some counties, such as Travis County, the local court mandates a mediation if the hearing will last more than 3 hours. Other counties, like Williamson, Hays and the surrounding counties don’t have the same requirements, however they all encourage mediation.