Batch rendering batches for Unity3d rendering

Source: Internet
Author: User

Batch rendering (batches)

Batch render is a way for most engines to improve rendering efficiency, and the basic principle is to create a large object by combining some objects that are rendered in a consistent state, once submitted to the GPU for plotting, and if not batch, it will be submitted to many times, which can significantly save Drawcall, This essentially saves CPU time, the CPU is submitted multiple times to commit once, and the GPU does not have to switch the render state multiple times. Of course, the premise of batch must be a set of objects that render in a consistent state.

Unity3d batch rendering is divided into two types, dynamic and static


Static Batch requirements: the same material must be used and then set to static batching in the editor. Features: Static batch is unable to move. So the general production process, for the scene of these static objects are static batch, the art will be based on the scale of the scene, the adjacent piece of the map of an object to merge into one or several 1024 or 512 large map, so that these objects can use the same material, can be static batch together, greatly save DC. Static batch When the Unity3d will generate a merged large model at runtime, and assign a common map for this model, so the number of this batch together is limited, if the number of fixed-point batch together, it will be automatically divided into two batches, The upper limit of a static batch I self-test about more than 60,000 vertex units.
Dynamic batch Dynamic batch is for those objects that are not marked as static batching in runtime unity will automatically batch them together, this can support moving objects, But the restrictions are stricter: 1. The total vertex unit of a batch is less than 9002. All the models that are batched together apply the same scale value of 3. Use the same material 4. The same LIGHTMAP5. Cannot use multiple pass SHADER6. Cannot receive shadows
So it is generally a small movement of the model is relatively easy to dynamically batch together, of course, Unity also said that may be in subsequent versions to relax this limit

Batch rendering batches for Unity3d rendering

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.