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

关于/noteForOpenGL/resources/models/sphere/ #2

Open
ghost opened this issue Nov 23, 2017 · 1 comment
Open

关于/noteForOpenGL/resources/models/sphere/ #2

ghost opened this issue Nov 23, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 23, 2017

您好, 您在反射一节应用的这个图,里面没有法线信息, 没有办法计算光照吧?您是怎样做的,求解答 谢谢

@wangdingqiao
Copy link
Owner

wangdingqiao commented Nov 27, 2017

sphere.obj确实没有提供法线信息,不过利用ASSIMPL库加载时,使用了参数aiProcess_GenSmoothNormals:
const aiScene* sceneObjPtr = importer.ReadFile(filePath, aiProcess_Triangulate | aiProcess_FlipUVs | aiProcess_GenSmoothNormals);

会重新计算出法向量的。

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