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

halfVector in diagram seems to be off #78

Open
trusktr opened this issue May 29, 2017 · 3 comments
Open

halfVector in diagram seems to be off #78

trusktr opened this issue May 29, 2017 · 3 comments

Comments

@trusktr
Copy link
Contributor

trusktr commented May 29, 2017

In the diagram the "halfVector" doesn't visually seem right. If I complete the rectangle and get the long vector (surface2view + surface2light vectors), then half of that doesn't not align with the rendered "halfVector".

@greggman
Copy link
Member

You're not adding the vectors, you're adding the direction of the vectors. In other words you add the normalized vectors, not the vectors themselves to get the halfVector.

@greggman
Copy link
Member

greggman commented May 31, 2017

The simplest update might just be to change it from

If we know the direction from the surface of our model to the light (which we do since we just did that). And if we know the direction from the surface to view/eye/camera, which we can compute, then we can add those 2 vectors and normalize them to get the halfVector

to

If we know the direction from the surface of our model to the light (which we do since we just did that). And if we know the direction from the surface to view/eye/camera, which we can compute, then we can add those 2 directions and normalize the result to get the halfVector. Note: by direction I mean the normalized values of the 2 vectors, surface2View and surface2Light.

Or something simple like that. I don't want to add paragraphs of text if it's not needed.

@trusktr
Copy link
Contributor Author

trusktr commented Jun 13, 2017

I think

Note: by adding those 2 directions I mean adding the normalized values of each of the 2 vectors, surface2View and surface2Light.

sounds good, with the rest the same. 👍

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

2 participants