[PATCH] Add the possibility to remove sorting by distance for not-so-transparent models such as trees
Some transparent models currently require sorting by distance, in order to avoid usual transparency artifacts if rendering is not done in the proper order. However, this is only really a problem with models that are actually somewhat transparent, whereas for example trees mostly use alpha as "opaque or transparent" in which case sorting by distance is not required.
This speeds up the rendering a lot on maps with many trees, since we can then also speed the batching up.
The attached patch also makes batching compare between all textures, though that change is minimal.
In the patch, basic_trans_wind material (used by all trees that move in the wind) uses the new "model_transparent_nosort" effect which doesn't sort by distance.
For full effect, this could also be used for most bushes, and perhaps other elements. Note that stuffs like lilypads shouldn't use it as that would case artifacts when there are many of them in the same spot (z-conficting).
I'm posting this as a patch and a ticket, we still can not add it if it's undesirable, but the graphical artifacts should be minimal and/or unnoticeable, and the speed boost should be very noticeable.
Hmm is that patch complete, I don't see where the "no-sorting" comes into play?