This repository contains optimizations described in https://blog.rukhanka.com/optimizing-smr.
-
Clone this repository into Packages folder of your project.
-
Remove original Entities.Graphics entry from manifest.json
-
Make changes to the animation-aware shader graph:
- Create "Custom Function" shader graph node.
- Configure the node with the following properties:
- Connect vertex data input ports with object space vertex position/normal/tangent properties.
- Provide vertexID node with appropriate data.
- Connect output ports with corresponding inputs of the master vertex node.
- Create "_ComputeMeshIndex" property with "HybridPerInstance" declaration:
The final shader should look like this: