Your data read here is somehow launched on the very first frame even before scene is returned, but if you actually run for example onAfterRenderObservable, it would take ~5ms :
Reading data to the CPU is known to be slow and occurs within a promise, so data won’t be available until the end of the current frame, at best. Unfortunately, there’s no way around this, so you should try as far as possible not to rely on getting data from the CPU side.
If you really need the data on the CPU, you should be prepared to get the data this frame, the next frame or even frame+n: there’s no guarantee when the data will be available (although in practice the data should be available a few milliseconds after the job has been submitted to the GPU)…
Unfortunately not. After looking into the problem a bit, it seems that people settle for a fixed number of steps (as we do in our own OIT implementation with deep peeling).