Closed Geetchopra closed 5 years ago
say you are using a directional light.
Your light vector(direction) has 3 components x,y,z
say you want your light to rotate in x,z plane which means y component will be a constant
all you need is to calculate x,z coordinate which should lie on a circle.
how can you calculate x,z coordinates on a circle (think about polar coordinates)
thats just one way to do it
That was perfect! It does not need to be accurate to the gif in the handout, right?
No it doesnt need to be exactly same
I don't know how to rotate the light in lit.fs. I can calculate Blinn phong color appropriately but cannot get the light to rotate independently from the spheres. If I try to call functions like model or rotate_about_y they give errors. I would be grateful if someone could guide me on what to do. Thank you!