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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user