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

Invalid result if textures coordinates are qual #4

Open
stefaniapedrazzi opened this issue Sep 19, 2019 · 0 comments
Open

Invalid result if textures coordinates are qual #4

stefaniapedrazzi opened this issue Sep 19, 2019 · 0 comments

Comments

@stefaniapedrazzi
Copy link

If multiple texture coordinates points to the exact same point the cotangentFrame function returns an invalid matrix.
This is because duv1 and duv2 will be zero vectors and will lead to a division by zero at this line:

float invmax = 1.0 / sqrt(max(dot(T,T), dot(B,B)));

In default texture mapping of meshes, the case where vertices points to the same texture coordinate is quite common.
Should not be cotangentFrame robust enough to handle these cases too?

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

No branches or pull requests

1 participant