Skip to content

Commit

Permalink
change order
Browse files Browse the repository at this point in the history
  • Loading branch information
GraphicsEnthusiast committed Jan 13, 2024
1 parent 850a93a commit 58f43ee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/Integrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ Spectrum VolumetricPathTracing::SolvingIntegrator(Ray& ray, IntersectionInfo& in
}
}

// Update information
V = -L;
mult_trans_pdf = 1.0f;
pre_position = info.position;
ray = Ray::SpawnRay(info.position, L, info.Ng);

// Russian roulette
if (bounce > 3 && history.MaxComponentValue() < 0.1f) {
auto continueProperbility = std::max(0.05f, 1.0f - history.MaxComponentValue());
Expand All @@ -195,12 +201,6 @@ Spectrum VolumetricPathTracing::SolvingIntegrator(Ray& ray, IntersectionInfo& in
if (history.HasNaNs()) {
break;
}

// Update information
V = -L;
mult_trans_pdf = 1.0f;
pre_position = info.position;
ray = Ray::SpawnRay(info.position, L, info.Ng);
}

return radiance;
Expand Down

0 comments on commit 58f43ee

Please sign in to comment.