The purpose of Project 6 is to exercise off-screen rendering and the implementation of simple image processing tasks in the fragment shader. This will take advantage of interaction, multiple shaders, multiple models, textures — essentially everything we've done thus far.
Create Project 6 as usual. It doesn't really matter what scene we render, but it's most interesting if the geometry is textured. For this reason, just reuse the treasure chest from Project 5.
At initialization, create a framebuffer object with color and depth texture attachments.
At draw time, bind this framebuffer object and render the treasure chest scene to it. Then, bind the null
framebuffer object to re-enable on-screen rendering, and bind the color texture attachment as the model texture.
Render this square. With a proper shader, the sequare will fill the screen and provide texture coordinates that map the framebuffer object's color texture back onto the screen pixel-for-pixel.
Implement three image processing shaders: threshold, blur, and edge detect. Add an HTML radio button group to allow the user to select which shader is used.