光照探针着色器 uniform 值提取自为此渲染器设置的材质属性块。
如果属性 unity_SHBb
、unity_SHBb
、unity_SHBb
、unity_SHBb
、unity_SHBb
、unity_SHBb
和 unity_SHC
不是此 MaterialPropertyBlock 的一部分,将设置为零。\
如果属性 unity_ProbesOcclusion
不是此 MaterialPropertyBlock 的一部分,将以在法线光照中的方式计算。
请注意,在不同位置使用烘焙光照探针值可能会导致渲染错误,特别是在使用局部光照(例如点光源和聚光灯)时。在使用 Graphics.DrawMeshInstanced 绘制实例化对象时(这时光照探针数据经过预先计算并以数组形式提供),这种模式更为有用。
另请参阅:MaterialPropertyBlock、MaterialPropertyBlock.CopySHCoefficientArraysFrom、MaterialPropertyBlock.CopyProbeOcclusionArrayFrom。
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.