You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rough transmission with dispersion is too dark under direct light (pdf differs between sample() and eval()) #329
Summary. A rough refractive material with use_dispersion renders about 15% darker when light and BSDF samples are combined than with either alone. Without dispersion all three agree. Version 2026.29.1, scalar mode.
Reproduce. A rough glass sheet (DwaBaseMaterial, transmission 1, roughness 0.3, use_dispersion true, dispersion_abbe_number 20) lit by a disk light behind it, max_depth 1:
light_samples 4, bsdf_samples 0
0 / 4
2 / 2
no dispersion
0.1107
0.1112
0.1113
with dispersion
0.1107
0.1114
0.0942
Cause.TransmissionCookTorranceBsdfLobe::sample() (lib/rendering/shading/bsdf/cook_torrance/BsdfTransmissionCookTorrance.cc) picks a colour channel and multiplies the returned pdf by the channel probability:
Color result = eval(slice, wi, etaT, &pdf);
// Dispersion PDF
pdf *= spectralPDF;
eval(), which the integrator calls for light samples, returns the pdf at mEtaT without that factor. The integrator's power heuristic then sees 0.35 p on the BSDF-sample side and p on the light-sample side, and the two weights sum to less than one.
Suggestion. Have eval() and sample() report the same density for a given direction (for instance the mixture over the three channels in both).
Activity