Hi
I find no documentation at all on this. Since version 5.5 I believe, there is an option on certain material prefabs that says “enable instancing”. It’s a checkbox.
I assumed it was related to GPU Instancing, but that’s setup on the shader not on the material. So now I’m not sure if enable instancing is the gpu instancing thing or related to copying material properties to as new instances on prefabs or what it is, because nowhere the checkbox is explained.
I also noticed that sometimes the checkbox is there, sometimes it’s not.
Any clues?
Looks like it should be explained here, but that page is out of date: Unity - Manual: GPU instancing
@zeroyao is that right?
it isn’t. It’s also not clear why some materials have the checkbox and others don’t, even using the same shader.
The updated doc is still in draft: [5.6 DRAFT] GPU instancing - Google Docs
…and this checkbox is only alive since 5.6.
2 Likes
would this mean we don’t need to touch the shaders to support instancing any more?
When you don’t need any properties varying per-instance except transforms. Otherwise you’ll still need to create custom instancing shaders and declare those additional per-instance properties.
Ok any idea the tree maker would not allow to mark the material for instancing? I checked the shaders and they have instance enabled but if you create a tree and check the material, the instancing box is disabled and you can’t enable it. Sounds like having material instancing on trees is exactly the perfect usage scenario :?
1 Like
no clue? also from the documentation the instancing only works on one material per object, since trees have 2 materials (bark and leaves) it seems it would only work on one, but you can’t even select the material manually on the inspector to be using instancing.
lastly, if this is the case, wouldn’t it be better to split the trees in 2 objects so it uses 1 material per object (leaves/bark) so everything can use instancing?
Does GPU installing support sprites now?
tree maker supported now?