SirKero / RTProgressivePhotonMapper

A Hardware Raytracing based Progressive Photon Mapper using Falcor 5.2
Other
48 stars 4 forks source link

Darker than Path Tracing #1

Closed Pommpy closed 3 weeks ago

Pommpy commented 1 month ago

Hi,

I've noticed that RTPM is darker than Path Tracing in the scene veachBiDir (and also in other scenes). The following images show the darker regions. Do you have any clues why it happens? I've also implemented a Photon Mapper in Falcor and got the same dark results as RTPM.

image

image

SirKero commented 3 weeks ago

This occurs because Falcor also multiplies NdotL in the bsdf.eval function and photon mapping does not need multiplication with NdotL during collection as the photons are already cosine distributed. Easiest way to fix this is to divide the radiance by NdotL. E.g. change in PhotonMapperCollect.rt.slang: 132 rayData.radiance += f_r * photon.flux.xyz; to if(NdotL > 0) rayData.radiance += (f_r * photon.flux.xyz) / NdotL

I will fix this within the next few days.

SirKero commented 3 weeks ago

Should now be fixed. In addition to the mentioned error, there was also an error with the generation PDFs.

RTPM: RTPM_BiDir ToneMapper dst 10172

Path Tracer: Path_BiDir ToneMapper dst 16194