diff options
author | Thomas Dinges <blender@dingto.org> | 2013-06-11 01:55:41 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-06-11 01:55:41 +0400 |
commit | 9020df976ca37104a36a90d43c6e5b33c24cdbd2 (patch) | |
tree | 8ce649d25f4de2f84b340a9d8328ef39ed8b2851 /intern/cycles/kernel/svm/svm_sky.h | |
parent | c03e638cf310cde57ede10d3d9c90aecce007b15 (diff) | |
parent | cf359f6c7f259bf669a144c9a455fe79780fc6ff (diff) |
Cycles / Wavelength to RGB node:
* Added a node to convert wavelength (in nanometers, from 380nm to 780nm) to RGB values. This can be useful to match real world colors easier.
* Code cleanup:
** Moved color functions (xyz and hsv) into dedicated utility files.
** Remove svm_lerp(), use interp() instead.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Wavelength
Example render:
http://www.pasteall.org/pic/show.php?id=53202
This is part of my GSoC 2013. (revisions 57322, 57326, 57335 and 57367 from soc-2013-dingto).
Diffstat (limited to 'intern/cycles/kernel/svm/svm_sky.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_sky.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/intern/cycles/kernel/svm/svm_sky.h b/intern/cycles/kernel/svm/svm_sky.h index eaba4d18365..8b4e35816d0 100644 --- a/intern/cycles/kernel/svm/svm_sky.h +++ b/intern/cycles/kernel/svm/svm_sky.h @@ -18,26 +18,6 @@ CCL_NAMESPACE_BEGIN -__device float3 xyY_to_xyz(float x, float y, float Y) -{ - float X, Z; - - if(y != 0.0f) X = (x / y) * Y; - else X = 0.0f; - - if(y != 0.0f && Y != 0.0f) Z = (1.0f - x - y) / y * Y; - else Z = 0.0f; - - return make_float3(X, Y, Z); -} - -__device float3 xyz_to_rgb(float x, float y, float z) -{ - return make_float3(3.240479f * x + -1.537150f * y + -0.498535f * z, - -0.969256f * x + 1.875991f * y + 0.041556f * z, - 0.055648f * x + -0.204043f * y + 1.057311f * z); -} - /* * "A Practical Analytic Model for Daylight" * A. J. Preetham, Peter Shirley, Brian Smits |