- Home /
How to avoid culling when instancing object via DrawMeshInstancedIndirect
The instanced objects disappear as soon as the game object drawing them gets out of the view frustum. Is there any way how to prevent that from happening? i.e. is there a way to force rendering the instanced object all time or give a bounding volume for the game object?
Following the example on https://docs.unity3d.com/560/Documentation/ScriptReference/Graphics.DrawMeshInstancedIndirect.html or https://github.com/noisecrime/Unity-InstancedIndirectExamples and move the parent game object out of the view frustum and all objects disappear.
Answer by GemBot · May 10, 2017 at 07:17 PM
If oneself is to fast with Copy and Paste. Should have read the function header more carefully:
DrawMeshInstancedIndirect(Mesh mesh, int submeshIndex, Material material, Bounds bounds, ...
Set your desired bounding size and the instanced objects are visible all the time.
Your answer
Follow this Question
Related Questions
Shader graph and GPU instancing 0 Answers
Cant find Standard Surface Shader (Instanced) in Unity 2 Answers
Gpu Instancing exemple? 1 Answer
How do I enable GPU Instancing on the Sprites-Default shader? 1 Answer
GPU instancing shader wrong rotation,Unity GPU instancing shader wrong rotation 0 Answers