Version: 2021.1
言語: 日本語

Graphics.DrawMeshInstancedProcedural

マニュアルに切り替える
public static void DrawMeshInstancedProcedural (Mesh mesh, int submeshIndex, Material material, Bounds bounds, int count, MaterialPropertyBlock properties, Rendering.ShadowCastingMode castShadows, bool receiveShadows, int layer, Camera camera, Rendering.LightProbeUsage lightProbeUsage, LightProbeProxyVolume lightProbeProxyVolume);

パラメーター

mesh 描画する Mesh
submeshIndex 描画するメッシュのサブセット。これはいくつかのマテリアルで構成されるメッシュにのみ適用されます。
material 使用する Material
bounds The bounding volume surrounding the instances you intend to draw.
count The number of instances to be drawn.
properties Additional material properties to apply. See MaterialPropertyBlock.
castShadows Determines whether the Meshes should cast shadows.
receiveShadows Determines whether the Meshes should receive shadows.
layer 使用する Layer
camera If null (default), the mesh will be drawn in all cameras. Otherwise it will be drawn in the given Camera only.
lightProbeUsage LightProbeUsage for the instances.

説明

Draws the same mesh multiple times using GPU instancing. This is similar to Graphics.DrawMeshInstancedIndirect, except that when the instance count is known from script, it can be supplied directly using this method, rather than via a ComputeBuffer.

To render the instances with light probes, provide the light probe data via the MaterialPropertyBlock and specify lightProbeUsage with LightProbeUsage.CustomProvided. Check LightProbes.CalculateInterpolatedLightAndOcclusionProbes for the details.