Version: 2023.2
언어: 한국어

CommandBuffer.SetInstanceMultiplier

매뉴얼로 전환
public void SetInstanceMultiplier (uint multiplier);

설명

Adds a command to multiply the instance count of every draw call by a specific multiplier.

Changing the instance multiplier is useful for stereo rendering optimizations such as single pass instanced rendering. For example, if you set the multiplier to 2, a command that draws one instance, instead draws two, and a command that draws two instances, draws four. See Single Pass Instanced Rendering for more information.

The multiplier is used until you reset it by calling this function again with a new value. The default multiplier is 1. Passing a parameter value of 0 to this function also sets the instance multiplier to 1.

The instance multiplier affects draw calls submitted by internal Unity Engine functions as well as CommandBuffer.DrawMesh, CommandBuffer.DrawMeshInstanced, Graphics.DrawMeshInstanced, CommandBuffer.DrawProcedural, and Graphics.DrawProcedural

Note that the multiplier is not used for the indirect commands, CommandBuffer.DrawMeshInstancedIndirect, Graphics.DrawMeshInstancedIndirect, CommandBuffer.DrawProceduralIndirect, Graphics.DrawProceduralIndirect.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961