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
Some questions in lesson 6 #87
Comments
I think light vector nl can be calculated in both world or view space. But if we choose one space, then the normal vector must be calculated in the same space, the dot between the n and nl are the same for different spaces. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the normal mapping part of lesson 6,when we calculate nl, why uniform_M is ProjectionModelView and uniform_MIT is (Projection*ModelView).invert_transpose(), I think it should be ModelView and ModelView.invert_transpose() . since Projection matrix is non-linear, doing calculation in clip space confusing me a lot, maybe we should just calculate it in world or view space?
the code responds is follow:
`
struct Shader : public IShader {
mat<2,3,float> varying_uv;
mat<4,4,float> uniform_M; // ProjectionModelView, why? I think it should be ModelView
mat<4,4,float> uniform_MIT; // (ProjectionModelView).invert_transpose(), why? I think it should be ModelView.invert_transpose()
}
`
My English is not so well, but I still want to thank you for your starting this project, I figure out many questions that have puzzled me a long time :)
The text was updated successfully, but these errors were encountered: