Author: Romain Vergne (website)
Please cite my name and add a link to my web page if you use this course

Image synthesis and OpenGL: exercises 07

Setup

We will use Linux and the following libraries:

Installing sources. In a terminal, do:
  1. Download the sources at http://romain.vergne.free.fr/teaching/IS/data07/TP07.tgz
  2. If needed, edit the file main.pro to change paths
  3. To compile: qmake && make
  4. To run: ./tp07 file.off
  5. To edit: use either your preferred text editor or qtcreator

Deferred Shading

The goal of these exercices is to familiarize yourself with Framebuffer objects and the Deferred Shading technique. You should obtain something like:

Color/albedo map

Normal map

Depth map

Rendering

Advice: you won't be able to test the result before the whole pipeline is created. Follow precisely the steps

Exercise 1: real-time coding (with the prof.)


Exercise 2: a simple depth dependent-lighting

  1. In the first shader, compute the depth value and store in in the last channel (the A) of one of the textures
  2. In the second shader, computer a Phong shading that changes according to the depth value
    1. For instance, modify the object color or add a fog effect according to the depth value

Exercise 3: free coding!

The following exercises are independent. You can choose them or make your own effects!


 
PREVIOUS: 07 - ADVANCED
NEXT: 08 - SHADOWS