Performance: Material properties
MEDIUM IMPACT
Material properties affect rendering speed and GPU workload by controlling how surfaces look and react to light.
Material sharedMat = Resources.Load<Material>("RedMaterial"); // Reuse sharedMat for all objects needing the same look
Material mat = new Material(Shader.Find("Standard")); mat.SetFloat("_Glossiness", 1.0f); mat.SetColor("_Color", Color.red); // Applying unique material instance per object
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Unique material per object | N/A | N/A | High GPU cost per object | [X] Bad |
| Shared material reused | N/A | N/A | Lower GPU cost, fewer draw calls | [OK] Good |