Skip to content

Rough transmission with dispersion is too dark under direct light (pdf differs between sample() and eval()) #329

Open

Description

@gonsolo

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions