So the sun shines on a vector.
I would like to be able to work out the direction vector from the camera to the sun, but I appear to be missing some information to be able to calculate it, such as the sun position.
The sun position in screen co-ords would be most useful.
Nieb posted a useful function for setting the Sun with pitch / yaw
FUNCTION SetSunAngle(Pitch,Yaw)
xzLen# = cos(Pitch)
X# = xzLen# * sin(-Yaw)
Y# = sin(Pitch)
Z# = -xzLen# * cos(Yaw)
Print(" SunVec: " + str(X#)+" "+str(Y#)+" "+str(Z#))
SetSunDirection(X#,Y#,Z#)
ENDFUNCTION
Could this be used in conjunction with camera position/angle to work out the angle to sun or screen co-ords?