Resolution

It is important to know what are draw calls and what are batches. A draw call is a call to the graphics API to draw objects (e.g draw a triangle), while a batch is a group of draw calls to be drawn together. Batching objects to be drawn together, minimizes the state changes needed to draw each object inside the batch. This is turn leads to improved performance by reducing the CPU cost of rendering the objects.

Unity groups in batches the objects to be drawn in two ways: Dynamic Batching and Static Batching. Only objects that share properties like textures or materials can be batched together.

Static batching is the recommended(推荐的) batching technique(技巧) for objects that do not move and it render batched objects very fast. It has a trade off(trade off 权衡) regarding memory, as the meshes need to be combined into a single larger mesh, which is made of the union(并集) of all the smaller individual(个体) meshes in the scene that are marked as static and meet the criteria(标准) to be batched together. To do static batching, you need your objects to be static, thus mark them as static in the inspector.

Dynamic batching on the other hand, tries to optimize the way non-static objects are rendered, by this transforming their vertices on the CPU, grouping many similar vertices together, and drawing them all in one go. It's limited to small meshes, as batching larger meshes dynamically is more expensive than not batching them.

To learn more about how to batch objects or what are draw calls please see the official documentation here.

What are draw calls(绘制命令) and what are batches(批)的更多相关文章

  1. WPF学习笔记(3):Path绘制命令zz

    WPF的XAML提供了一系列功能强大.用法复杂的 mini-language 来描述可扩展应用程序标记语言 (XAML) 中的几何路径.如下所示: XAML <Canvas>   < ...

  2. 在unity5中减少Draw Calls(SetPass Calls)[转]

    在unity5中减少Draw Calls(SetPass Calls)   我一直工作于unity5支持的Standard Shader(标准着色器)上,并且做了一些关于如何有效地减少draw cal ...

  3. Unity对象与Draw Calls的关系

    什么是Draw Calls? 首先我们先来了解一下,什么叫做“Draw Calls”:一个Draw Call,等于呼叫一次 DrawIndexedPrimitive (DX) or glDrawEle ...

  4. NGUI Draw Calls优化(思路)

    用NGUI做界面的时候发现不注意GameObject(或者说Widget)的depth的话,单独运行界面时,Draw Calls挺高的: 网上搜了一下,大把的博客说的都是类似以下的原则: (PS:以下 ...

  5. 深入浅出聊优化:从Draw Calls到GC

    前言: 刚开始写这篇文章的时候选了一个很土的题目...<Unity3D优化全解析>.因为这是一篇临时起意才写的文章,而且陈述的都是既有的事实,因而给自己“文(dou)学(bi)”加工留下的 ...

  6. 优化 从Draw Calls到GC

    原文出处: 慕容小匹夫的博客(@慕容小匹夫)   欢迎分享原创到伯乐头条 前言: 刚开始写这篇文章的时候选了一个很土的题目...<Unity3D优化全解析>.因为这是一篇临时起意才写的文章 ...

  7. 深入浅出聊Unity3D项目优化:从Draw Calls到GC

    前言: 刚开始写这篇文章的时候选了一个很土的题目...<Unity3D优化全解析>.因为这是一篇临时起意才写的文章,而且陈述的都是既有的事实,因而给自己“文(dou)学(bi)”加工留下的 ...

  8. Cocos2d-x 重写draw方法绘制直线等图形时被遮挡覆盖问题的一种解决方案

    最近在学习过程cocos2dx的过程中需要使用到绘制直线的功能,所以我就采用了引擎中 ccDrawLine 方法,然后重写 draw 方法,在该方法中绘制直线. 但是出现了一个问题,那就是绘制的图形被 ...

  9. 使用Draw rect 绘制圆角矩形

    - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); UIGraphicsPush ...

随机推荐

  1. vue @import css

    @import '~@/assets/scss/helpers/_mixin'; 原理:CSS loader 会把把非根路径的url解释为相对路径, 加~前缀才会解释成模块路径.

  2. 如何搭建一个spring boot项目

    什么是springboot? Spring Boot俗称微服务.Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程.该框架使用了特 ...

  3. Codeforces 892E Envy

    问题描述 小Q正在玩一个叠塔的游戏,游戏的目标是叠出尽可能高的塔.在游戏中,一共有n张矩形卡片,其中第i张卡片的 长度为a_i,宽度为b_i.小Q需要把所有卡片按一定顺序叠成一座塔,要求对于任意一个矩 ...

  4. Linux内核设计与实现 总结笔记(第六章)内核数据结构

    内核数据结构 Linux内核实现了这些通用数据结构,而且提倡大家在开发时重用. 内核开发者应该尽可能地使用这些数据结构,而不要自作主张的山寨方法. 通用的数据结构有以下几种:链表.队列.映射和二叉树 ...

  5. 树TreeView控件与DataTable交互添加节点(最高效的方法)

    #region "读取树结点从Datatable" /// <summary> /// 读取树结点从Datatable" /// </summary&g ...

  6. 【Java架构:进阶技术】——一篇文章搞掂:JVM调优

    Sun官方定义的Java技术体系: Java程序设计语言 各种硬件平台上的Java虚拟机 Class文件格式 Java API类库 来自商业机构和开源社区的第三方Java类库 JDK(Java Dev ...

  7. git错误处理

    1.今天 当我  执行  git add  somefile 的时候,出现 如下 错误: If no other git process is currently running, this prob ...

  8. 这才是Tomcat内存配置的正确姿势

    1.背景 虽然阅读了各大牛的博客或文章,但并没有找到特别全面的关于JVM内存分配方法的文章,很多都是复制黏贴 为了严谨,本文特别备注只介绍基于HotSpot VM虚拟机,并且基于JDK1.7的内存分配 ...

  9. Dos.Common - 目录、介绍

    引言: Dos.Common是一个开发中的常用类库,如HttpHelper.LogHelper.CacheHelper.CookieHelper.MapperHelper等等.与Dos.WeChat. ...

  10. eval方法遇到的问题

    工作中有这样的场景,一个表达式比如 2*2,计算结果是number,这样的为true,如果输入错误 2*@,这样的情况需要匹配为false. 这里使用的eval方法, type of (eval('2 ...