September 2018
Intermediate to advanced
472 pages
15h 36m
English
Start by setting up for rendering to a framebuffer object (FBO) with a color texture attached; we'll render the raw pre-filtered image to this texture. Create a second texture to receive the output from the edge-detection filter. Bind this latter texture to unit 0. We'll use this as the output from the compute shader. Bind the FBO texture to image texture unit 0, and the second texture to image texture unit 1 using glBindImageTexture.
Next, set up a vertex/fragment shader pair for rendering directly to the FBO, and for rendering a full-screen texture.
Read now
Unlock full access