注意:这是一个预览功能,将来可能会更改。如果有使用此功能的场景,可能需要在以后的发行版中更新这些场景。在该功能尚未正式发布之前,请勿在大规模生产环境中依赖此功能。
渐进 GPU 光照贴图是渐进光照贴图的后端,使用计算机的 GPU 和 VRAM 来生成烘焙__光照贴图__和__光照探针__。
要使用渐进 GPU 光照贴图,计算机必须具有:
如果您的计算机具有多个 GPU,则 Unity 选择 Editor 使用的 GPU。您还可以选择一个 GPU 进行渲染,并选择其他 GPU 进行光照烘焙。有关如何更改此设置的信息,请参阅本页中的配置要使用的 GPU 部分。
注意:如果烘焙过程使用的 GPU 内存超过可用的 GPU 内存,该过程可回退到 CPU 光照贴图。一些具有虚拟内存支持的图形驱动程序将切换为 CPU 内存,这会使烘焙过程变慢。
您可以选择一个 GPU 来渲染场景,并选择另一个 GPU 进行光照烘焙。如果自动的 GPU 分配不符合您的需要,您可以指定用于烘焙的显卡。
要查看 Unity 当前用于烘焙的 GPU,请在 Editor 中执行以下操作:
要查看计算机中可用的 GPU,请执行以下操作:
要选择特定的 GPU 进行烘焙,请在命令行中输入以下命令(用相应的数字替换 platform
和 device index
):
Unity.exe "-OpenCL-PlatformAndDeviceIndices" <platform> <device index>
在处理场景时,您选择的分配应取决于您的需求。如果将最强 GPU 分配给任一活动,则可能会对其他活动的性能造成影响。如果遇到问题,请尝试重新分配 GPU。
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.