Jump to content

How do you batch draw calls on the meshes ?


HoloLite
 Share

Recommended Posts

In a test scene that I am working on, it has high draw calls (some 300's) and it seems like every mesh contributes to one draw call.

As a quick test, if I set n # of meshes to be unvisible, then this will pretty much reduce the draw calls by n.

Are there any tips to tell bjs to batch the draw calls ? Perhaps rearranging certain attributes  inside the mesh might help ?

Thanks

 

Link to comment
Share on other sites

Unfortunately the clone/instance/sps does not apply here. The meshes are completely different, plus they are actually coming from scene generated by the exporter, so I have little control, however still curious if there are anything possible to reduce the draw calls. 

What I learned during my test is high # of draw calls is not necessarily bad for fps though. It's still possible to reach 90fps, depending many other factors. 

Link to comment
Share on other sites

I did look into merge meshes api but unfortunately it does not apply either here as every mesh has its own geo and material. 

So looks like there is not much I can optimize on this matter but the upside is there are optimizations which did bring up fps quite a bit, like freezing meshes, Oct tree etc. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...