knightcrawler25 / GLSL-PathTracer

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

Question on implementation of Transmission and Reflection #72

Closed Jack12xl closed 1 year ago

Jack12xl commented 2 years ago

I noticed on this line https://github.com/knightcrawler25/GLSL-PathTracer/blob/22b136c34a2369dd3f2e1f942e2d37b9594484dd/src/shaders/common/disney.glsl#L217 You use un-sampled L to estimate the fresnel term. Wonder if this is valid😮?

knightcrawler25 commented 2 years ago

Hey @Jack12xl

You're right. It's not valid to use L when that's what we're trying to find :D

Thanks for finding this. I'll update the code soon.

knightcrawler25 commented 1 year ago

This should be fixed now (71b16a18645245c893280a8eda3cc438dc4ca330).