How to use MultiRenderTarget to make all the content in the scene only need to be rendered at one time and generate bbl default rendering results and user-defined rendering results (colorId is used for picking)?
I have tens of millions of meshes hoping to pick up faster this way.
I have a new idea, should I customize GeometryBufferRenderer ?
Sorry, I don’t think I understand what you’re trying to achieve.
MultiRenderTarget isn’t something one would typically use to speed up a single render —
ThinInstance is a more conventional choice for that — and tens of millions of meshes is going to be a challenge pretty much any way you slice it, depending on your hardware.
If what you’re trying to implement is GPU picking — being able to tell which mesh the cursor is hovering over using GPU information — then you very well might be able to do this using a
MultiRenderTarget, but there are additional complexities. You’ll need to either use a single material for the picking render and switch a
colorId uniform on it every single draw call, or you’ll need to have a separate picking material for every mesh, which will get very heavy. Either way, you may also have trouble with running out of
colorId values with “tens of millions” of meshes; RGB8 only gives you about 17 million possible colors, so you’d probably have to use alpha for this as well.
Hope this helps, and best of luck!
Hello just checking in, was your question answered? @Luck_Good