Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLTIntegrator::L(): why is pRaster (created by sampling lens) sometimes discarded? #486

Open
w3ntao opened this issue Feb 11, 2025 · 0 comments

Comments

@w3ntao
Copy link
Contributor

w3ntao commented Feb 11, 2025

In function MLTIntegrator::L(): pRaster was first initialized by

    *pRaster = sampleBounds.Lerp(sampler.GetPixel2D());

and might be overwritten later with

    pstd::optional<Point2f> pRasterNew;
    SampledSpectrum L = ConnectBDPT(*this, *lambda, lightVertices, cameraVertices, s, t,
                                    lightSampler, camera, &sampler, &pRasterNew) *
                        nStrategies;
    if (pRasterNew)
        *pRaster = *pRasterNew;

It looks like the previous *pRaster got wasted when a pRasterNew is found.

Couldn't L contributed to 2 points (pRaster and pRasterNew) just like BDPT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant