My OSM viewer could show endless objects but is limited by the users GPU of course. Week GPUs should get “loaded” with less objects or objects with less details.
The function addLODLevel works fine mostly. I would like to set the LoD distance according to the actual FPS. But how?
I could removeLODLevel and again addLODLevel to change the distance, could I? But it would reload the whole mesh, wouldn’t it?
Or is there an other access to the distance value? Or could BJS get this as a new feature?
I do have quite some meshes using LoD. Changing them all cyclically is a bit odd.
Could the GPU use references to a common value from multiple meshes? So I could change only this value?
I see. This way I could code a dynamic “distance”. My calback-code had to calculate the distance itself and could set the mesh in/visible. - Thanks @bghgary.
No example, only one PG, a useless two-liner not running anyway. I will make one.
I expected the GPU is doing the compares for my hundreds of meshes and un/hiding in each render cycle. But if a customLODSelector exists, all the LoD is a feature of BJS, running in the CPU.
It wouln’t be bad if the BJS tells, if it the cyclic load adds to the GPU or CPU to optimize the render time.