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)?

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.

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.

Except for this:

[ul]
[li]ARB_texture_barrier [/li][/ul]
But that doesn’t help the OP avoid multiple render passes.

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”.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.