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:
- initially create, setup (attach texture, ...) , bind frame buffer object
- now render stuff onto effect should applied fbo's attached texture
- render texture same fbo using shader first pass
- 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
Post a Comment