glsl - OpenGL: Multipass Rendering using Frame Buffer Objects -


while developing small 2d engine, stumbled across little design problem i'm unfortunately level of knowledge unable solve without of you.

let me explain: game i'm developing 2d engine should contain complex effects, require multiple render passes. problem is, i'm not sure if understood concept of multipass rendering right.

at level of knowledge, implement way:

  1. initially create, setup (attach texture, ...) , bind frame buffer object
  2. now render stuff onto effect should applied fbo's attached texture
  3. render texture same fbo using shader first pass
  4. unbind fbo , render attached texture standard fbo using shader last pass

the question if efficent way of solving problem, or if there better ways of doing out there.

render texture same fbo using shader first pass

you cannot simultaneously read , write same image in same texture. well, can, undefined behavior, isn't helpful. need either use multiple textures or perhaps use nv_texture_barrier available.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -