knightcrawler25 / GLSL-PathTracer

A toy physically based GPU path tracer (C++/OpenGL/GLSL)
MIT License
1.87k stars 176 forks source link

Fix microfacet distribution function pdf #47

Closed todaylg closed 3 years ago

todaylg commented 3 years ago

https://github.com/mmp/pbrt-v3/blob/master/src/materials/disney.cpp#L313

knightcrawler25 commented 3 years ago

Hey,

The angle between the V,H and L,H should be the same for specular reflection as mentioned here: https://www.pbr-book.org/3ed-2018/Reflection_Models/Microfacet_Models#TheTorrancendashSparrowModel (Also see Figure 8.20)

Do you see any changes in the output with the modified code?

todaylg commented 3 years ago

Get it, it's the same. Thank you