-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Add support for black and white Bump Maps to compute normals #558
Comments
Hello! this might be easier if you make a PR so I can see the code in context - but it would be nice to add support for bump maps. But that aside we can't treat bump maps in exactly the same way that three.js does. the dFdx / dFdy functions will not work, for example, because they rely on the samples that neighboring pixels have made. Instead we'll need to sample sibling pixels to manually take the derivative and compute the resulting normal. You'll also see that normal maps require tangents to define the surface normal frame rather than the view direction as three.js uses since that's not really a viable option for path tracing. We'll want to do the same thing for bump maps, as well. |
Thanks for reply! I'll open PR soon |
@gkjohnson #559 I open pull request |
I tried to find a way to implement this issue but |
Yes I think generating a normal map is the easiest approach for now. Perhaps in the future bump maps can be added but they seem less common. |
Always thanks you for maintain amazing library
I tried to add bumpMap support like three.js
but I got half success(bumpMap Rendered in only two faces and other faces are black) of it do you guys have any ideas?
I use this bumpTexture
PhysicalPathTracingMaterial's vertex shader i add vViewPosition
Is it wrong to put normal sampled by barycentric coord into a function based on tangent space?
The text was updated successfully, but these errors were encountered: