HoloLite Posted April 13, 2018 Share Posted April 13, 2018 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 Quote Link to comment Share on other sites More sharing options...
JohnK Posted April 14, 2018 Share Posted April 14, 2018 Is this what you are looking for? Quote Link to comment Share on other sites More sharing options...
HoloLite Posted April 14, 2018 Author Share Posted April 14, 2018 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. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 16, 2018 Share Posted April 16, 2018 You cannot batch automatically but merging meshes with same material can definitely help: http://doc.babylonjs.com/how_to/how_to_merge_meshes Quote Link to comment Share on other sites More sharing options...
HoloLite Posted April 16, 2018 Author Share Posted April 16, 2018 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. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 16, 2018 Share Posted April 16, 2018 Ok understood! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.