Textures

Create a projects for this exercise called Textures_A, Textures_B & Textures_C, based on the template BasicShader&Torus

Part A

  1. Modify the shader code to allow to render an unlitcolor texture on the torus.
  2. Add code to mix texture and lighting (the texture should appear lit)

Part B

  1. Write a shader which will render a colour texture in gray-scale. The equation for converting a colour to grayscale = 0.3R + 0.59G + 0.11B
  2. Write a shader which will render a colour texture as negative.

Part C

  1. Add per-pixel lighting to the application.
  2. Create a texture file (.bmp) consisting of broad red and black stripes.
  3. Write a shader which uses the red channel of the texture to control the amount of specular reflection. Use the value in the red channel as the phong exponent. The result should be a torus with alternating bands of matt and shiney.