Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Use of GL_ARB_shader_image_load_store extension

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2017
    Posts
    28

    Use of GL_ARB_shader_image_load_store extension

    In my current GLSL source code, the output of fragment shader must be read and accessed (like pixel coordinates). As far as I know, on the fragment shader the data is not in pixel level yet (they are "fragments", one step before the pixel) and this procedure can be done by FBO-RTT with two or more shader passes, or can done by extension (in this case, GL_ARB_shader_image_load_store). How can I do this process by following the second option (GL_ARB_shader_image_load_store)?

  2. #2
    Senior Member OpenGL Lord
    Join Date
    May 2009
    Posts
    6,057
    In my current GLSL source code, the output of fragment shader must be read and accessed (like pixel coordinates).
    "be read and accessed" by whom?

    this procedure can be done by FBO-RTT with two or more shader passes, or can done by extension (in this case, GL_ARB_shader_image_load_store).
    Image load/store reads from images. Therefore, the value has to already have been written.

    Furthermore, image load/store cannot read from images attached to the framebuffer, in the exact same way that you cannot use images attached to the framebuffer for textures.

  3. #3
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,545
    Quote Originally Posted by romulogcerquerira
    How can I do this process by following the second option (GL_ARB_shader_image_load_store)?
    Beyond reading the documentation on how it works, if you still have questions, read through a few tutorials that make use of image load/stores in shaders. For instance, this one.

    Quote Originally Posted by Alfonse Reinheart View Post
    Except for this:


    But that doesn't help the OP avoid multiple render passes.
    Last edited by Dark Photon; 04-08-2018 at 02:01 PM.

  4. #4
    Senior Member OpenGL Lord
    Join Date
    May 2009
    Posts
    6,057
    Quote Originally Posted by Dark Photon View Post
    Read that extension again. It only permits accessing the framebuffer attached image as a texture. It says nothing about using image load/store operations on it. The first several paragraphs of the "Rendering Feedback Loops" section makes it clear that it is about an image being "bound to a texture unit". Not an image unit.

    Hence its name being "texture barrier" not "image barrier".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •