Universal RP 使用一个通用的阴影贴图图集渲染一帧中所有实时阴影,用于所有点光源阴影(即聚光灯和点光源的阴影),以及另一个用于方向光阴影的阴影贴图图集。
在您 Unity 项目的通用渲染管线资源中设置这些图集的大小。图集大小决定了您场景场景包含游戏环境和菜单。可以将每个唯一的场景文件视为一个唯一的关卡。在每个场景中,您放置环境、障碍物和装饰,从本质上讲是分段设计和构建您的游戏。 更多信息
参见词汇表中阴影的最大分辨率。
例如,大小为 1024 x 1024 的图集可以容纳
如果您想确保 Universal RP 用于项目中特定点光源阴影的分辨率不会低于特定值:考虑场景中所需的阴影贴图数量,并选择足够大的阴影图集分辨率。
例如:如果您的场景中有四个聚光灯和一个点光源;并且您希望每个阴影贴图分辨率至少为 256x256。您的场景需要渲染十个阴影贴图(每个聚光灯一个,点光源六个),每个分辨率为 256x256。使用大小为 512x512 的阴影图集是不够的,因为它只能包含四个大小为 256x256 的贴图。因此,您应该使用大小为 1024x1024 的阴影图集,它最多可以包含十六个大小为 256x256 的贴图。
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.