I added cvars for tuning BVH code in runtime:
modelBvhShadowsGranularity
modelBvhLightTrisGranularity
Meshes with size less than X are now processed using the old non-BVH algorithm, so if you set it to huge value, you'll get non-BVH performance (well, almost). Also it limits how much BVH traversal recurses into its subnodes.
However, I did not get much difference from tuning them.
Also, I have optimized the shadow volume generation algorithm with BVH.
Now it should be somewhat faster than before.
However, don't expect it to reach full non-BVH speed.
The non-BVH algorithm is much simpler (thus less overhead) than BVH-using algorithm, and also it can avoid computing some quantities several times thanks to the fact it always processes all triangles + vertices.
So, some slowdown here is the price to pay.