Question 1: OpenGL shaders
(a) Which of the following stages are NOT programmable in OpenGL/GLSL:
Geometry Shader, Fragment Shader, Rasterizer, Vertex Shader
(b) In which order are the above stages executed in the graphics pipeline?
(c) Shaders include uniform and varying (non-uniform) variables.
Briefly describe the difference between them.
3
Question 2: Gamma Correction
(a) Assuming your rendering program on a linear scale outputs a color of
(1.0, 0.0, 0.5). Assuming you have a gamma of 2.0, what color will be
displayed? Please write the final answer in the answer box.
Answer: R: G: B:
(b) Is the displayed color brighter or darker than the original? Is the color more
saturated (closer towards primaries) or less saturated?
(c) If you wish to gamma correct, what is the gamma-corrected value that you must
use to output the correct color? Verify that after display, this does in fact
produce the result desired. (You may round to the nearest tenth or leave the
answer in terms of radicals). Please write your answer in the answer box below.
Answer: R: G: B:
4
Question 3: Short Questions
(a) Briefly describe the difference between raster and vector graphics.
(b) Name the three primary colors. Name the three secondary colors (from mixing
primaries).
(c) Briefly explain Z-Buffering
Sample Solution