博览会:
1) My viewport is 800x600
2) I have tex1 = frame buffer object; rendered to a texture, 800x600
3) I have tex2 = frame buffer object; rendered to a texture, 800x600
现在,我想在屏幕上创建以下图像:
tex1 _on top of_ tex2.
Where tex1 is black, display tex2's pixel.
Else, display tex1's pixel.
有没有办法我可以完全在 GPU 上完成这最后一步(看起来只是有点玩弄 + 显示到屏幕上)。我目前的解决方案包括 1) 将 tex1 & tex2 读回 CPU 的内存 2) 在 CPU 上执行数组操作和 3) 将其发送回 GPU,然后显示它。但是,似乎我应该能够完全在 GPU 上做到这一点。
谢谢!