Using compute shaders for reading/writing to textures and FBO

To see how to use compute shaders for pixelwise working with images, see openFrameworks example examples/gl/computeShaderTextureExample.

Also, I modified this example on using FBO (ofFbo) instead textures (ofTexture).
As I checked, that FBO's textures (fbo.getTextureReference) also works with shader for reading and writing.

So, FBOs can be used in compute shaders as an universal "drawable" textures: it's possible to read and write to them pixelwise, and it's possible to draw in them using OpenGL rendering (fbo.begin()...fbo.end())


Additional links:


Comments

Popular posts from this blog

Computing ray origin and direction from Model View Projection matrices for raymarching

Forward and backward alpha blending for raymarching

Forward, Deferred and Raytracing rendering in openFrameworks and web