mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.83k stars 440 forks source link

Interface material visibly appears on gpu integrators #445

Open Sindarin27 opened 6 hours ago

Sindarin27 commented 6 hours ago

When rendering an object with the interface material, it is expected that this object does not impact the rendered image.

When rendering with the volpath integrator on the CPU, the rendered image looks as expected, with or without the sphere of material interface: image

When rendering on the GPU using --gpu or --wavefront (on an NVIDIA GeForce RTX 3050Ti), the same sphere is visible as a shadow: image

The same shadow is visible when specifying a MediumInterface within the object, making media bounded by an interface always appear darker on the GPU.

Scene available here: https://pastebin.com/arz47sa6

shadeops commented 4 hours ago

Try increasing the 'maxdepth' of the Volume Integrator.

One difference between the wavefront integrator and cpu volume integrator is that the wavefront includes interface intersections as part of the ray depth while the CPU one does not.

Try setting it to 10 or 15 and see if sphere artifact goes away.

Sindarin27 commented 2 hours ago

Increasing the maxdepth value above the default of 5 indeed takes care of the artifact. Thank you for the help.