pbrt-v3
pbrt-v3 copied to clipboard
Plastic material - indices of refraction swapped
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);
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...