每个 相机创建场景中特定视角的图像的组件。输出要么绘制到屏幕上,要么作为纹理捕获。 更多信息
参见 词汇表 在渲染其视图时存储颜色和深度信息。屏幕上未绘制的部分为空,默认情况下将显示 天空盒用于表示天空的特殊材质。通常是六面的。 更多信息
参见 词汇表。当您使用多个相机时,每个相机都会在其缓冲区中存储自己的颜色和深度信息,并在每个相机渲染时积累更多数据。在您场景中的任何特定相机渲染其视图时,您可以设置 **清除标志** 来清除缓冲区信息的不同集合。为此,请从以下四个选项中选择一个
这是默认设置。屏幕上任何空的部分都将显示当前相机的天空盒。如果当前相机没有设置天空盒,它将默认使用在 照明窗口(菜单:窗口 > 渲染 > 照明)中选择的天空盒。然后它将回退到 **背景颜色**。或者,可以将 天空盒组件 添加到相机。
屏幕上任何空的部分都将显示当前相机的 **背景颜色**。
如果您想绘制玩家的枪支而不让它被环境剪切,请将一个相机设置为 **深度** 0 以绘制环境,并将另一个相机设置为 **深度** 1 以单独绘制武器。将武器相机的 **清除标志** 设置为 **仅深度**。这将保留环境的图形显示在屏幕上,但会丢弃有关每个对象在 3D 空间中存在位置的所有信息。绘制枪支时,不透明部分将完全覆盖任何绘制的内容,无论枪支离墙壁有多近。
此模式不会清除颜色或 深度缓冲区存储图像中每个像素的 z 值深度的内存存储,其中 z 值是每个渲染像素距投影平面的深度。 更多信息
参见 词汇表。结果是每帧都会绘制在下一帧上,从而导致模糊效果。这通常不用于游戏,而更有可能用于自定义 着色器在 GPU 上运行的程序。 更多信息
参见 词汇表。
请注意,在某些 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.