Computer Graphics Project 3 – Outline & Motion Blur Shader

Yes! Shaders!

Using C++ and OpenGL.

This is a 4 passes pipeline.

1st pass: use a shader to convert vertex normal to color (make a normal texture/normal map).

2nd pass: use openGL fixed-functionality to render the mesh to fbo, get color texture and depth texture.

3rd pass: based on depth and normal texture, compute the outline, use color texture to cover the rest of the image.

4th pass: combine current frame and previous frames of the output in 3rd pass, get motion blur effect.

Input: Scenes, and functions to load shaders.

Output: Shaders that modify the rendering to have black outlines. They must be based on a combination of deference in depth and deference in surface normal. Shaders that simulate motion blur effects when the camera moves.

Spheres with outline :

Motion blur:

Plane with outline :

Motion blur with fewer samplers :

Motion Blur with more samplers:

Leave a Reply