Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么在分层帧缓冲区上使用渲染缓冲区不起作用?我读到,如果您想获得深度值,则必须使用额外的纹理。是这样吗?还是有其他选择使用渲染缓冲区?
是的,就是这样。为什么?嗯,简单的答案是它是这样定义的。来自 OpenGL 规范文档的“Whole Framebuffer Completeness”部分:
如果任何帧缓冲区附件是分层的,则必须对所有填充的附件进行分层。此外,所有填充的颜色附件必须来自同一目标的纹理(三维、一维或二维数组、立方体贴图或立方体贴图数组纹理)。
由于没有分层渲染缓冲区,因此您不能将它们用于分层渲染。