多重采样时如何解析 OpenGL 纹理中的深度值?

发布于 2024-07-25 13:28:14 字数 143 浏览 5 评论 0原文

我正在使用 FBO 将场景渲染为深度纹理 (GL_DEPTH_COMPONENT)。 当我在应用程序中启用多重采样时,这些样本将解析为单个纹素,但它们是如何组合的? 是存储到纹理的最近样本的深度,还是样本的平均值? 此行为是否依赖于供应商?

I'm using an FBO to render my scene to a depth texture (GL_DEPTH_COMPONENT). When I enable multisampling in my application, those samples are resolved to a single texel, but how are they combined? Is the depth of the nearest sample stored to the texture, or the average of the samples? Is this behavior vendor-dependent?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜唯美灬不弃 2024-08-01 13:28:14

请参阅 multisample 规范文档

“如果深度测试通过,则所有多样本缓冲区深度样本值
设置为片段最中心样本深度的深度
值,并且所有多重采样缓冲区颜色样本值均设置为
传入片段的颜色值。”

See the multisample specification document:

"If the depth test passes, all multisample buffer depth sample values
are set to the depth of the fragment's centermost sample's depth
value, and all multisample buffer color sample values are set to
the color value of the incoming fragment."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文