We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here is the code of sampling normal from normal map:
tinyrenderer/model.cpp
Lines 86 to 93 in 907bb56
I can't understand why the element order of normal is reversed, that is, why not write the code like this:
for (int i=0; i<3; i++) res[i] = (float)c[i]/255.f*2.f - 1.f;
The text was updated successfully, but these errors were encountered:
It is a simple question of color packing in TGA images; they are stored in the BGR order and not RGB.
Sorry, something went wrong.
No branches or pull requests
Here is the code of sampling normal from normal map:
tinyrenderer/model.cpp
Lines 86 to 93 in 907bb56
I can't understand why the element order of normal is reversed, that is, why not write the code like this:
The text was updated successfully, but these errors were encountered: