Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle refractionIndex as being one over refraction index. #4499

Merged
merged 7 commits into from
Aug 3, 2022

Conversation

GSterbrant
Copy link
Contributor

Description

Standard material treated refractionIndex as being the actual index of refraction value, when in fact it's edited as 1.0 / IOR. So to fix that, we have to treat refractionIndex as the inverse, and calculate a correct F0 from that.

@GSterbrant GSterbrant added the bug label Aug 3, 2022
@GSterbrant GSterbrant self-assigned this Aug 3, 2022
@GSterbrant GSterbrant merged commit df2d502 into main Aug 3, 2022
@GSterbrant GSterbrant deleted the gsterbrant_refractionIndex_fix branch August 3, 2022 11:39
slimbuck pushed a commit that referenced this pull request Aug 3, 2022
* Handle refractionIndex as being one over refraction index.

* Remove conditional calculation of f0 value.

* Add guard against reflection index of 0.

* Add guard against refraction index of 0.

* (Inf - 1) / (Inf + 1) converges at 1, so a better solution is to use a constant of 1.0 if the refraction index is 0.0.

* Fix lint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants