Back to Filament

instances

docs/android/dokka/filament-android/com.google.android.filament/-renderable-manager/-builder/instances.md

1.75.0922 B
Original Source

//filament-android/com.google.android.filament/RenderableManager/Builder/instances

instances

[main]
open fun instances(instanceCount: Int): RenderableManager.Builder

Specifies the number of draw instance of this renderable. The default is 1 instance and the maximum number of instances allowed is 32767. 0 is invalid. All instances are culled using the same bounding box, so care must be taken to make sure all instances render inside the specified bounding box. The material can use getInstanceIndex() in the vertex shader to get the instance index and possibly adjust the position or transform.

Parameters

main

instanceCountthe number of instances silently clamped between 1 and 32767.