ScriptReference/Graphics.DrawMeshInstancedIndirect #242
Replies: 4 comments
-
|
Note you may need to supply this pragma to ensure that
|
Beta Was this translation helpful? Give feedback.
-
|
Comment by This performs frustum culling based on the bounds parameter. |
Beta Was this translation helpful? Give feedback.
-
|
Normals on mesh instances will be messed up, because unity_WorldToObject inverse is incorrectly calculated. Calculate the inverse matrix manually in the shader. (from https://forum.unity.com/threads/trying-to-rotate-instances-with-drawmeshinstancedindirect-shader-but-the-normals-get-messed-up.707600/) and then in your setup function: |
Beta Was this translation helpful? Give feedback.
-
|
for culling individual instances, you have two (practical) options:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
ScriptReference/Graphics.DrawMeshInstancedIndirect
https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstancedIndirect.html
Beta Was this translation helpful? Give feedback.
All reactions