How do you batch draw calls on the meshes ?

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 ?



Share this post

Link to post
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. 

Share this post

Link to post
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. 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.