如果 GPU 原生支持对片元着色器中的 uniform 数组编制索引,并且无任何限制,则返回 true。
一些 OpenGL ES 2 GPU 不支持使用任意变量对片元着色器中的 uniform 数组编制索引。OpenGL ES 2 GLSL 规范只要求通过常量、for-loop 计数器以及在片元着色器中组合使用这两者编制索引。不保证支持使用其他变量编制索引。 生成的着色器代码通过为着色器中使用的每个索引数组提供封装器来处理这些差异。封装器提供两个代码路径,一个直接对数组编制索引,另一个使用分支模拟索引。在设备上运行时,着色器编译器根据设备功能选择正确的代码路径。 如果运行的设备不能原生支持使用任意变量在片元着色器中对 uniform 数组编制索引,此标志提供了选择简单着色器的可能性。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.