gpt4 book ai didi

unity3d - 在相机的 "Don' 属性中使用 "Clear Flags"t Clear"

转载 作者:行者123 更新时间:2023-12-02 01:23:34 34 4
gpt4 key购买 nike

在 Unity 的 Camera组件中有一个属性清除标志,它允许从四个选项中进行选择:天空盒、纯色、仅深度和不清除。

正如文档所说:

Don’t clear

This mode does not clear either the color or the depth buffer. The result is that each frame is drawn over the next, resulting in a smear-looking effect. This isn’t typically used in games, and would more likely be used with a custom shader.

Note that on some GPUs (mostly mobile GPUs), not clearing the screen might result in the contents of it being undefined in the next frame. On some systems, the screen may contain the previous frame image, a solid black screen, or random colored pixels.



“这通常不用于游戏,更有可能与自定义着色器一起使用”

所以我的问题是:

如何在自定义着色器中使用它以及使用它可以实现什么效果?

有没有人使用过它或者对基本概念有很好的解释。

谢谢

最佳答案

线程问题有点老,但是我遇到了这个问题并解决了它。

我制作了一个重现这种效果的屏幕图像效果,你可以在这里看到它:

https://github.com/falconmick/ClearFlagsMobile

希望这可以帮助!

关于unity3d - 在相机的 "Don' 属性中使用 "Clear Flags"t Clear",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38531818/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com