标签:ace raw edit ons targe type ops sha function
Thanks for posting these tips. I was devastated when my project dropped to 3 FPS because material properties don‘t work out of the box. I was able to edit the generated shader to go from 5000 draw calls to ~15. Here are some relevant snippets. I am only changing the color of my game objects in this example
Find all of these blocks of code (there are several copies)
Replace them with this
Then find every instance of _BaseColor in the shader functions (there are several copies)
Replace them with UNITY_ACCESS_INSTANCED_PROP(Props, _BaseColor)
And lastly don‘t forget to set the material properties on your game object
标签:ace raw edit ons targe type ops sha function
原文地址:https://www.cnblogs.com/nafio/p/14817385.html