Implement Next Event Estimation.

This commit is contained in:
hal8174 2024-05-06 12:02:55 +02:00
parent 30e0019a88
commit 616741d7dd
2 changed files with 104 additions and 6 deletions

View file

@ -12,6 +12,7 @@ private:
Vec3fa renderPixel(float x, float y, const ISPCCamera& camera, RayStats& stats, RandomSampler& sampler) override;
Vec3fa renderPixelOrig(float x, float y, const ISPCCamera& camera, RayStats& stats, RandomSampler& sampler);
Vec3fa renderPixelPathTracer(float x, float y, const ISPCCamera& camera, RayStats& stats, RandomSampler& sampler);
Vec3fa renderPixelNextEventEstimation(float x, float y, const ISPCCamera& camera, RayStats& stats, RandomSampler& sampler);
void drawGUI() override {
ImGui::ColorEdit3("Color", colorLight);
@ -20,8 +21,8 @@ private:
ray_depth = 1;
}
const char* items[] = {"Original", "Path Tracer"};
ImGui::Combo("Version", &selected, items, 2);
const char* items[] = {"Original", "Path Tracer", "Next Event Estimation"};
ImGui::Combo("Version", &selected, items, 3);
const char* scenes[] = {"Cornell", "Veach"};
int oldscene = scene;