Skip to content

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

Merged
dictoon merged 1 commit intoappleseedhq:masterfrom
laurelkeys:fix-2765
Mar 24, 2020
Merged

Fix black-body emission not working when emission color is black#2806
dictoon merged 1 commit intoappleseedhq:masterfrom
laurelkeys:fix-2765

Conversation

@laurelkeys
Copy link
Copy Markdown
Contributor

@laurelkeys laurelkeys commented Mar 17, 2020

Addresses #2765.

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

if (compute_edf && in_tonemap_edf)
{
edf_color /= luminance(edf_color) + 1.0;
}
if (compute_edf && max(edf_color) > 0.0)
{
out_outColor += transmittance * opacity *
edf_color * emission();
}

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

Copy link
Copy Markdown
Member

@dictoon dictoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dictoon dictoon merged commit f0a5731 into appleseedhq:master Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants