Cycles / Blackbody node:

* First (brute force) implementation for SVM. This works and delivers the same result as OSL, but it's slow. 
* Code inside svm_blackbody.h inspired by a patch by Philipp Oeser (#35698), thanks. 

Ideas:
* Use a lookup table to perform the calculations on render/ level.
* Implement it as a RNA property only, and do the calculation like Sun/Sky precompute.
This commit is contained in:
Thomas Dinges
2013-06-15 23:47:09 +00:00
parent d523d27e62
commit 9e16c5a9e4
6 changed files with 120 additions and 5 deletions

View File

@@ -22,6 +22,10 @@ shader node_blackbody(
float Temperature = 1200.0,
output color Color = 0.0)
{
Color = blackbody(Temperature);
color rgb = blackbody(Temperature);
/* Scale by luminance */
float l = luminance(rgb);
Color = rgb /= l;
}