MultiRenderTarget long delay



I’m using a 2048x2048px MultiRenderTarget with WebGL2 to render 64x64px tiles. It uses a R32F texture, a RGB8 for normals, and another 2 RGB8 for alphasplatting and material indexes.

I already use a MultiRenderTarget for deferred lights with a RGB32F and few more smaller RGB8 ones without issues. The issue i’m having is a very long delay when the first 64 tiles are rendered the first time. The issue doesn’t appears by using the R32F texture only, but appears by using an additional RGB8.

The tiles are used for a planet renderer, at very fast movements it can render up to 200 tiles per frame but without any laggs.

My question is if the large number of render calls per frame at memory allocation and multiple attachments could cause issues? By using a breakpoint before and after the render call, the huge delay of about 5 seconds appears after 3-6 render calls. Does using a type float texture force all textures to use float? (this should fail since WebGL2 requires an additionally internalFormat to be set correctly)

Edit: By rendering each texture as separate WebGLRenderTarget, the issue disappears too. But with such frequent render calls multiple attachments would be more preferable.