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

offset.w should be zero? #6

Open
gwaldron opened this issue Nov 8, 2017 · 2 comments
Open

offset.w should be zero? #6

gwaldron opened this issue Nov 8, 2017 · 2 comments

Comments

@gwaldron
Copy link

gwaldron commented Nov 8, 2017

Great set of examples!

One observation: since this is an offset vector, shouldn't the w component be zero instead of one? Setting it to one will break when using an orthographic camera.

vec4 offset = vec4(normal * orientation, 0.0, 1.0);

@natevm
Copy link

natevm commented Sep 21, 2018

@gwaldron I just ran into a bug when using this shader with an orthographic camera. Setting w to 0 on the offset fixed my bug. Thanks for the tip.

@amadeusCaleb
Copy link

I ran into the same bug thanks @gwaldron and @natevm

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

3 participants