The internal trigger function of the render method is different

Hello everyone, I have been studying performance issues recently, and I found that the render method is called differently in different scenarios. I want to understand the difference between the two methods. I look forward to your reply!


Welcome aboard!

_renderToTarget is the main method used to render meshes in a render target texture:

_renderOpaqueSorted is used to render the opaque subset of some (sub) meshes (either for a render target texture or for the main pass):

At some point, _renderToTarget will call _renderOpaqueSorted (through the rendering manager).

4 Likes

Thank you very much for your reply. Can you give some examples of only calling _renderOpaqueSorted without calling _renderToTarget?

Yes, if you don’t use any RenderTargetTexture, _renderToTarget won’t be called. So, the default Playground is a good example of this!

Here’s a subset of a performance snapshot for the default PG:

Ok, I get it, thank you very much for your detailed reply!