This patch brings some fixes and UI changes to the Nishita Sky Texture:
- Add Sun Intensity parameter:
thanks to users feedback, this adds a new parameter for the intensity of the sun disc for better control of the sun lighting;
- Remove limit for Sun Rotation parameter:
again thanks to users feedback, this change is helpful for example to control the sun rotation via drivers;
- Remove Vector input when sun disc is enabled:
this was a necessary change due to the fact that the MIS samples the sun position based only on the Sun Elevation and Rotation parameters;
- Change Altitude parameter from meters to kilometers:
having the slider in meters made it hard for people to easily change the altitude;
- Sample more pixels toward the horizon:
given the fact that the sky has more visible color changes near the horizon, then sampling more pixels toward it produces better results (this doesn't affect performance because less pixels are sampled toward zenith and so the number of precomputed pixels is the same);
- Fix sun issue at Altitude 0:
the problem was given because the rays shot by the virtual camera that samples the precomputed texture could intersect with the Earth surface giving artifacts such as https://developer.blender.org/T78032. Clamping the altitude internally solved the issue;
- Fix: old files saved with older sky methods:
projects saved with versions before 2.90 got 0 as parameters for Nishita method, simple versioning fixed it.