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

Rename vViewPosition to vEyeDir #2

Open
vorg opened this issue Aug 15, 2018 · 0 comments
Open

Rename vViewPosition to vEyeDir #2

vorg opened this issue Aug 15, 2018 · 0 comments

Comments

@vorg
Copy link
Contributor

vorg commented Aug 15, 2018

In the source code you use V which is usually used for View Vector aka Eye Direction.
Even the vertex shader calculates eye direction.

// eyeDir = cameraPosInViewSpace - viewPos
// eyeDir = vec3(0.0, 0.0, 0.0) - viewPos
// eyeDir =  -viewPos

vViewPosition = -viewPos.xyz

https://github.com/glslify/glsl-perturb-normal/blob/master/demo/vert.glsl#L10

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