blender/intern/cycles/render
Sv. Lockal 7201f6d14c Cycles: Use curve approximation for blackbody instead of lookup table
Now we calculate color in range 800..12000 using an approximation a/x+bx+c for R and G and ((at + b)t + c)t + d) for B.
Max absolute error for RGB for non-lut function is less than 0.0001, which is enough to get the same 8 bit/channel color as for OSL with a noticeable performance difference.
However there is a slight visible difference between previous non-OSL implementation because of lookup table interpolation and offset-by-one mistake.
The previous implementation gave black color outside of soft range (t > 12000), now it gives the same color as for 12000.

Also blackbody node without input connected is being converted to value input at shader compile time.

Reviewers: dingto, sergey

Reviewed By: dingto

Subscribers: nutel, brecht, juicyfruit

Differential Revision: https://developer.blender.org/D1280
2015-05-05 06:11:54 +00:00
..
attribute.cpp Cycles: Code cleanup, spaces around keywords 2015-03-28 00:15:15 +05:00
attribute.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
background.cpp Cycles: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
background.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
bake.cpp Bake-API: reduce memory footprint when baking more than one object (Fix T41092) 2015-04-17 12:25:37 -03:00
bake.h Bake-API: reduce memory footprint when baking more than one object (Fix T41092) 2015-04-17 12:25:37 -03:00
buffers.cpp Cycles: Use native saturate function for CUDA 2015-04-28 00:38:32 +05:00
buffers.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
camera.cpp Cleanup: Code style. 2015-04-26 00:42:26 +02:00
camera.h Cycles: Cleanup, make more clear what camera utility functions are private/public 2015-04-10 16:25:35 +05:00
CMakeLists.txt Cycles: Use curve approximation for blackbody instead of lookup table 2015-05-05 06:11:54 +00:00
curves.cpp Cycles: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
curves.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
film.cpp Cycles: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
film.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
graph.cpp Cleanup: Code style. 2015-04-26 00:42:26 +02:00
graph.h Cycles: Use curve approximation for blackbody instead of lookup table 2015-05-05 06:11:54 +00:00
image.cpp Cycles: Synchronize images after building mesh BVH 2015-04-20 17:29:51 +05:00
image.h Cycles: Synchronize images after building mesh BVH 2015-04-20 17:29:51 +05:00
integrator.cpp Cycles: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
integrator.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
light.cpp Cycles: Added support for light portals 2015-04-28 01:30:16 +05:00
light.h Cycles: Added support for light portals 2015-04-28 01:30:16 +05:00
mesh_displace.cpp Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
mesh.cpp Cycles: Split BVH nodes storage into inner and leaf nodes 2015-04-20 17:29:51 +05:00
mesh.h Cycles: Synchronize images after building mesh BVH 2015-04-20 17:29:51 +05:00
nodes.cpp Cycles: Use curve approximation for blackbody instead of lookup table 2015-05-05 06:11:54 +00:00
nodes.h Cycles: Use curve approximation for blackbody instead of lookup table 2015-05-05 06:11:54 +00:00
object.cpp Cycles: Add some statistics logging 2015-04-10 15:37:49 +05:00
object.h Fix T43311: using displacement shader crashes blender 2015-01-19 19:23:21 +05:00
osl.cpp Cycles: Add some statistics logging 2015-04-10 15:37:49 +05:00
osl.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
particles.cpp Cycles: Add some statistics logging 2015-04-10 15:37:49 +05:00
particles.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
scene.cpp Cycles: Fix wrong order in object flags calculations 2015-04-30 01:09:48 +05:00
scene.h Cycles: Split BVH nodes storage into inner and leaf nodes 2015-04-20 17:29:51 +05:00
session.cpp Cycles: More instant feedback on progressive rendering for first sample 2015-04-06 19:28:25 +05:00
session.h Optionally use c++11 stuff instead of boost in cycles where possible. We do and continue to depend on boost though 2015-03-29 22:12:40 +02:00
shader.cpp Cycles: Use curve approximation for blackbody instead of lookup table 2015-05-05 06:11:54 +00:00
shader.h Cycles: Use curve approximation for blackbody instead of lookup table 2015-05-05 06:11:54 +00:00
sky_model_data.h Cycles: Code cleanyp, sky model 2015-03-28 00:28:37 +05:00
sky_model.cpp Cycles: Code cleanyp, sky model 2015-03-28 00:28:37 +05:00
sky_model.h Cycles: Code cleanyp, sky model 2015-03-28 00:28:37 +05:00
sobol.cpp Fix #29528: crash adding subsurf modifier in a particular scene with viewport render. 2011-12-08 21:55:35 +00:00
sobol.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
svm.cpp Cycles: Use curve approximation for blackbody instead of lookup table 2015-05-05 06:11:54 +00:00
svm.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
tables.cpp Cycles: Add some statistics logging 2015-04-10 15:37:49 +05:00
tables.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
tile.cpp Cycles: Code cleanup, spaces around keywords 2015-03-28 00:15:15 +05:00
tile.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00