Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2013-06-10 04:01:52 +0400
committerThomas Dinges <blender@dingto.org>2013-06-10 04:01:52 +0400
commit0dfc5fc3421adc9f5a44f59128363c51efb7ba4a (patch)
treed255a64b33d0bbea40c49eea8fdcae8bf1dadbcc /intern/cycles/kernel/shaders/node_sky_texture.osl
parentcf359f6c7f259bf669a144c9a455fe79780fc6ff (diff)
Cycles / Code cleanup:
* Move hsv and xyz color functions into the dedicated util files (util_color.h and node_color.h). * svm_lerp moved into util_math.h and renamed to lerp_interp, as it's used for the wavelength node now as well.
Diffstat (limited to 'intern/cycles/kernel/shaders/node_sky_texture.osl')
-rw-r--r--intern/cycles/kernel/shaders/node_sky_texture.osl21
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);