Textures
Create a projects for this exercise called Textures_A, Textures_B & Textures_C,
based on the template BasicShader&Torus
Part A
- Modify the shader code to allow to render an unlitcolor texture on the torus.
- Add code to mix texture and lighting (the texture should appear lit)
Part B
- 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
- Write a shader which will render a colour texture as negative.
Part C
- Add per-pixel lighting to the application.
- Create a texture file (.bmp) consisting of broad red and black stripes.
- 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.