Multithreaded Rendering & Graphics Jobs 多线程渲染与图形Jobs 性能系列8

本文主要介绍了Unity中的多线程渲染模式,包括单线程渲染、多线程渲染、Jobified渲染和图形Jobs,以及它们的实现方式、优缺点和适用平台。Unity默认使用多线程渲染,而在低端设备上可能不适用。同时,文章提到了分析多线程渲染性能的方法和注意事项。
摘要由CSDN通过智能技术生成

Multithreaded Rendering & Graphics Jobs 多线程渲染与图形Jobs

本文档主要是对Unity官方手册的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于Unity2018.3版本
参考链接:https://unity3d.com/cn/learn/tutorials/topics/best-practices/multithreaded-rendering-graphics-jobs?playlist=30089

Unity supports several modes of rendering depending on platform availability and graphics API:
Unity支持多种基于平台可用性和图形API的渲染模式:

  • Singlethreaded Rendering 单线程渲染
  • Multithreaded Rendering 多线程渲染
  • Jobified Rendering Jobified 渲染
  • Graphics Jobs 图形Jobs

If you do not select one of these modes in the Player Settings, Unity uses singlethreaded rendering.
如果你没有在Player 设置中选择其中一种模式,Unity会使用单线程渲染。

Singlethreaded Rendering (single client, no worker thread)
单线程渲染(一个客户端,没有工作线程)

Unity uses singlethreaded rendering by default if none of the other modes are enabled.
如果没有其他模式可用,Unity默认情况下使用单线程渲染。
This causes the single client to occupy the main thread while executing the high-level rendering commands.
这将导致单个客户端在执行高级渲染命令时占用主线程。

The single client executes all the rendering commands (RCMD) on the main thread. The client also owns the real graphics device GfxDevice and performs the actual rendering through the underlying graphics API (GCMD) on the main thread. This is suboptimal, because all commands you execute on the main thread subtract from important frametime which you could use for other subsystems running on the main thread.
单个客户端执行主线程上的所有渲染命令(RCMD)。客户端还拥有真正的图形设备GfxDevice,并通过主线程上的底层图形API (GCMD)执行实际的渲染。这不是最优的,因为您在主线程上执行的所有命令都会从重要的frametime中减去可以用于在主线程上运行的其他子系统的frametime。
在这里插入图片描述
Multithreaded Rendering (single client, single worker thread)
多线程渲染(一个客户端,一个工作线程)

Unity enables Multithreaded Rendering by default if the graphics API permits it. To disable Multithreaded Rendering (generally for profiling purposes), go to the Player Settings (menu: Edit > P

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值