appleseedhq / appleseed

A modern open source rendering engine for animation and visual effects
https://appleseedhq.net/
MIT License
2.19k stars 329 forks source link

Fix black-body emission not working when emission color is black #2806

Closed laurelkeys closed 4 years ago

laurelkeys commented 4 years ago

Addresses https://github.com/appleseedhq/appleseed/issues/2765.

The emission color would incorrectly affect black-body emission behaviour when it was black, as it made compute_edf equal to 0:

https://github.com/appleseedhq/appleseed/blob/bc952ad860ca6f93bfe4cdd2b966acac4cb42e20/src/appleseed.shaders/src/appleseed/as_standard_surface.osl#L852-L860

Now, in_incandescence_color has no effect when the emission type is "Black-body" (i.e. in_incandescence_type == 1). The "Custom" type behaviour remains unchanged.

image