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

Modify glm::refract's behaviour #808

Merged
merged 1 commit into from Aug 28, 2018
Merged

Modify glm::refract's behaviour #808

merged 1 commit into from Aug 28, 2018

Conversation

tigert1998
Copy link

Refer to issue #806.

No offence, I don't think the changes in 76580af is appropriate. Actually, eta's absolute value can be greater than 1.

When a bundle of light shoots from a denser medium (say, water whose refractive index equals 1.3325) to less dense medium (air, for instance), a full internal reflection is possible to happen.

In this case, eta is 1.3325 / 1 = 1.3325. If we constrict eta into the range from -1 to 1, glm will never support this kind of phenomenon, which is quite significant in computer graphics.

By the way, negative eta may be redundant.

@Groovounet Groovounet self-assigned this Aug 28, 2018
@Groovounet Groovounet added the bug label Aug 28, 2018
@Groovounet Groovounet added this to the GLM 0.9.9 milestone Aug 28, 2018
@Groovounet
Copy link
Member

You are quite right my change didn't made much sense.

Thanks for contributing!

@Groovounet Groovounet merged commit b52c256 into g-truc:master Aug 28, 2018
Groovounet added a commit that referenced this pull request Oct 31, 2018
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