diff options
Diffstat (limited to 'intern/cycles/kernel/shaders/node_sky_texture.osl')
-rw-r--r-- | intern/cycles/kernel/shaders/node_sky_texture.osl | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/intern/cycles/kernel/shaders/node_sky_texture.osl b/intern/cycles/kernel/shaders/node_sky_texture.osl index e9f7dfb3a2a..61788799d99 100644 --- a/intern/cycles/kernel/shaders/node_sky_texture.osl +++ b/intern/cycles/kernel/shaders/node_sky_texture.osl @@ -17,6 +17,7 @@ */ #include "stdosl.h" +#include "node_color.h" struct KernelSunSky { /* sun direction in spherical and cartesian */ @@ -28,26 +29,6 @@ struct KernelSunSky { float perez_Y[5], perez_x[5], perez_y[5]; }; -color xyY_to_xyz(float x, float y, float Y) -{ - float X, Z; - - if (y != 0.0) X = (x / y) * Y; - else X = 0.0; - - if (y != 0.0 && Y != 0.0) Z = ((1.0 - x - y) / y) * Y; - else Z = 0.0; - - return color(X, Y, Z); -} - -color xyz_to_rgb(float x, float y, float z) -{ - return color( 3.240479 * x + -1.537150 * y + -0.498535 * z, - -0.969256 * x + 1.875991 * y + 0.041556 * z, - 0.055648 * x + -0.204043 * y + 1.057311 * z); -} - float sky_angle_between(float thetav, float phiv, float theta, float phi) { float cospsi = sin(thetav) * sin(theta) * cos(phi - phiv) + cos(thetav) * cos(theta); |