Write a Processing program that makes use of the shaders. Make the following parameters… 1 answer below »

Part A (30%)
The folder PartA contains a pair of GLSL shaders that attempt to implement the Phong
illumination model [1]. Read through the code and make sure you understand how it works.
1. Write a Processing program that makes use of the shaders. Make the following
parameters adjustable by the user: SpecularFocus, SpecularContribution and
DiffuseContribution. Also incorporate a point light source and make it move according
to the mouse position. Demonstrate the effect on two different objects1
, experiment
with different parameter values and comment on the results.
[10 marks]
2. Add an ambient component to your shader and make it adjustable by the user.
[5 marks]
3. Add two more lights, making their position change over time. Make the number of lights
on the scene selectable by the user.
[5 marks]
4. Change the light sources so that they have colours (instead of being white). Implement
coloured lighting in your shaders by changing light intensity variable(s) to colour
vectors. How does the inherent colour of the surface influence the resulting (perceived)
colour?

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer