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
我认为应该把displacement_fragment_shader中的这段
displacement_fragment_shader
Vector3f n = (TBN * ln).normalized(); Vector3f p = point + n * huv * kn;
根据注释修改为
Vector3f p = point + normal * huv * kn; Vector3f n = (TBN * ln).normalized();
然后将下面进行着色的代码中的normal修改成上面的n
diffsue[i] = kd[i] * intensity * std::max(0.0f,normal.dot(light_dir)); // 应该修改为n specular[i] = ks[i] * intensity * std::pow(std::max(0.0f,normal.dot(h)),150); // 应该修改为n
The text was updated successfully, but these errors were encountered:
我认为应该把displacement_fragment_shader中的这段 Vector3f n = (TBN * ln).normalized(); Vector3f p = point + n * huv * kn; 根据注释修改为 Vector3f p = point + normal * huv * kn; Vector3f n = (TBN * ln).normalized(); 然后将下面进行着色的代码中的normal修改成上面的n diffsue[i] = kd[i] * intensity * std::max(0.0f,normal.dot(light_dir)); // 应该修改为n specular[i] = ks[i] * intensity * std::pow(std::max(0.0f,normal.dot(h)),150); // 应该修改为n
正确的,因为点是沿着原来的normal方向移动的
Sorry, something went wrong.
No branches or pull requests
我认为应该把
displacement_fragment_shader
中的这段根据注释修改为
Vector3f p = point + normal * huv * kn; Vector3f n = (TBN * ln).normalized();
然后将下面进行着色的代码中的normal修改成上面的n
The text was updated successfully, but these errors were encountered: