Open dongho-shin opened 3 months ago
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 https://github.com/gkjohnson/three-gpu-pathtracer/pull/559 I open pull request always respect and thanks to quick reply
I tried to find a way to implement this issue but I can't find a way without baked normalMap from bumpMap rendererd at rasterized view I checked a blender, it seems to use the baked normalMap
I can't find a way without baked normalMap from bumpMap rendererd at rasterized view
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?