0

I have been using several custom FBOs. FBO-A has MSAA texture attached into which the geometry is rendered.Then it is resolved by blitting MSAA texture attachment of FBO-A into regular tex 2d attachment of FBO-B.This procedure implies switching between multiple FBOs and it is stated in several sources that it is more performance wise to rather switch between the attachments than between different FBOs. I tried to set both MSAA texture and the regular one attached to the same FBO. But I found I can't do the resolve by blitting. If I do texture copy from MSAA to the regular one ,will the MSAA be resolved as with blitting?

UPDATE:

Just for those interested to know whether it's worth (performance wise) to use several FBOs vs several attachments in a single FBO. I just did a test (NVidia Quadro 4000) and the result was pretty identical FPS (+= 15-20 frames).it is probably hardware and OGL implementation dependent though.

4

1 回答 1

5

我尝试设置 MSAA 纹理和附加到同一个 FBO 的常规纹理。但我发现我无法通过 blitting 来解决问题。

当然不是。为了执行 blit,源和目标帧缓冲区必须是完整的。完整性规则之一是所有附加图像必须具有相同数量的样本。

如果我将纹理从 MSAA 复制到常规纹理,MSAA 会像使用 blitting 一样解决吗?

“纹理副本”是什么意思?

如果您正在谈论使用新的4.3/ARB_copy_image glCopyImageSubData,那么没有。同样,源图像和目标图像的样本计数必须匹配。

如果您正在谈论使用等从帧缓冲区复制到纹理glCopyTexSubImage2D,那么是的,这将执行多样本解析。

但是,你真的应该只做blit。

于 2013-05-06T09:17:42.267 回答