pbrt-v3 icon indicating copy to clipboard operation
pbrt-v3 copied to clipboard

Plastic material - indices of refraction swapped

Open serhii-rieznik opened this issue 6 years ago • 1 comments

Looks like there is a typo in the source code of the plastic material. Indices of refraction for the FresnelDielectric are swapped. The books says: Fresnel *fresnel = ARENA_ALLOC(arena, FresnelDielectric)(1.f, 1.5f);

While actual code is: Fresnel *fresnel = ARENA_ALLOC(arena, FresnelDielectric)(1.5f, 1.f);

Rest of materials (glass, uber, etc) follows book: Fresnel *fresnel = ARENA_ALLOC(arena, FresnelDielectric)(1.f, eta);

serhii-rieznik avatar Nov 12 '18 10:11 serhii-rieznik

Nice find--thanks. I think it's best to leave this unfixed for now, since changing it will change rendered images (and I suspect that many scenes have had a ReverseOrientation added to them to counter this bug. We'll fix this properly in the next version...

mmp avatar Jun 26 '20 17:06 mmp