[DOCS] add documentation for Material.clearVariants
Description
This PR documents the method clearVariants in Material.
Checklist
- [x] I have read the contributing guidelines
- [x] My code follows the project's coding standards
- [x] This PR focuses on a single change
What use case do you have that needs this to be public? Currently it's internal function, and clears variants as needed, without you having to do it manually.
Did not know about this method, and it actually pretty useful in case when updating global shader chunks, and need to force material shader updates.
What use case do you have that needs this to be public? Currently it's internal function, and clears variants as needed, without you having to do it manually.
@mvaligursky We need to call it in cases when we inherit pc.Material to create our own "smart" material like pc.StandardMaterial, which generate dynamic shader code based on material properties.
Did not know about this method, and it actually pretty useful in case when updating global shader chunks, and need to force material shader updates.
In this case, you just call material.update();