Results 1 to 6 of 6

Thread: what is glBlitFramebufferEXT used for ?

  1. #1
    Senior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    139

    what is glBlitFramebufferEXT used for ?

    Hello,
    what is glBlitFramebufferEXT used for ?
    I did a bloom shader. So I rendered the object into two
    textures (color_attachments) using FBO's. Then i blurred the texture 0 and at the end i draw the fullscreenquad with the
    original object from texture 1 and then blend over the blurred
    object from texture 0.

    but i cant see any geometry drawn after the fullscreen quads. Thats why they are the closest to the camera.

    So can i solve this problem with glBlitFramebufferEXT ?

    greetings
    lobbel

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2007
    Location
    Latvia
    Posts
    225

    Re: what is glBlitFramebufferEXT used for ?

    You don't need to render object to two textures.
    Render object only to one texture.
    Then do the bright-pass and do the blur on this texture (preferrably reduced 2x or 4x in size).
    Then combine original texture with this blurred texture to get final image.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    139

    Re: what is glBlitFramebufferEXT used for ?

    Thakns for you fast answer,

    But when I render the object to a texture i cant see it, because its rendered to the texture. Thats why i used 3 textures. Texture 0 and 1 for glow/bloom shader and the texture 2 for the original object. So the bloom shader here is a multipass shader. first pass is horizontal blur, second pass is the vertical blur and the thrid pass is blending. And it works.

    But i cant see geometry that has been drawn after the full screen quads. because they are the closes geometry to the camera.

    Thats my problem.

    you said "Then combine original texture with this blurred texture to get final image. "

    looks to me you also use 2 texture (?)


    lobbel

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2007
    Location
    Latvia
    Posts
    225

    Re: what is glBlitFramebufferEXT used for ?

    I don't understand why rendering fullscreen quad has to do something with camera and geometry?
    When you are rendering fullscreen quad disable depth test and depth writes. No need for depth testing. Just set up ortho projection (or identity matrix) and quad will be visible.

  5. #5
    Senior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    139

    Re: what is glBlitFramebufferEXT used for ?

    I can see the fullscreen quad. but because its a fullscreen quad i dont see objects that will be drawn later. Before i render the fullscreenquad i set identity matrix.

    I want to apply the glow shader not as an post processing effect. and I want to use it for some objects in my scene.

    lobbel

  6. #6
    Senior Member Regular Contributor
    Join Date
    Mar 2007
    Location
    Latvia
    Posts
    225

    Re: what is glBlitFramebufferEXT used for ?

    Then either you should reuse projection matrix and depth buffer for objects drawn at end. Or you could filter objects that don't need to glow in bright-pass, maybe using alfa channel as reference either to glow or not (0-no glow, 1-full glow).

Similar Threads

  1. glBlitFramebufferEXT
    By Taicoon in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-29-2010, 09:43 AM
  2. glBlitFramebufferEXT and ATI cards
    By Schnulla in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 09-28-2009, 01:58 PM
  3. glBlitFramebufferEXT with a shader
    By aronsatie in forum OpenGL: GLSL
    Replies: 0
    Last Post: 09-13-2008, 02:39 AM
  4. glBlitFramebufferEXT vs glReadPixels
    By aronsatie in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 04-20-2008, 04:24 PM
  5. glBlitFramebufferEXT with out-of-bounds src rect
    By skynet in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 04-22-2007, 05:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean