2

I have a scene, with single FBO defined in it. Like mentioned in question I use that same FBO for rendering..

e.g.

Bloom-
1- extract white parts of image
2- blur white parts
3- combine blurred white + original scene
4- render FBO

Now, everything works as expected, I see a nice bloomed image. But would there be any significant gains in the performance if I have separate FBOs for tasks 1, 2, and 3?

2am
  • 699
  • 1
  • 7
  • 25

1 Answers1

1

I've run into issues (failed renders) in WebGL when changing FBO attachments (i.e. from Float to 8 bit or changing configuration by dropping/adding a depth buffer). So in this case I'd recommend separate FBOs. However, I'm pretty sure these were bugs in the implementation.

I don't really see any significant performance difference with regular desktop GL, but my bottlenecks are generally elsewhere. I believe it only starts to matter when you use a lot of attachments such as the colour attachments, in which case a single bind/unbind for another FBO will be faster.

This become more interesting and complicated when your application can do some of these rendering jobs in parallel as I believe this answer is hinting at.

Related:

Lastly, testing/benchmarking just to make sure is never a bad idea.

Community
  • 1
  • 1
jozxyqk
  • 16,424
  • 12
  • 91
  • 180