This commit is contained in:
hal8174 2024-05-13 00:48:54 +02:00
parent c48475ca52
commit ea9ed59165
2 changed files with 164 additions and 19 deletions

View file

@ -13,16 +13,18 @@ private:
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);
Vec3fa renderPixelMIS(float x, float y, const ISPCCamera& camera, RayStats& stats, RandomSampler& sampler);
void drawGUI() override {
ImGui::ColorEdit3("Color", colorLight);
ImGui::InputInt("Ray depth", &ray_depth);
if (ray_depth < 1) {
ray_depth = 1;
}
const char* items[] = {"Original", "Path Tracer", "Next Event Estimation"};
ImGui::Combo("Version", &selected, items, 3);
ImGui::SliderFloat("beta", &beta, 0.1, 10.0);
const char* items[] = {"Original", "Path Tracer", "Next Event Estimation", "Multiple Importance Sampling"};
ImGui::Combo("Version", &selected, items, 4);
const char* scenes[] = {"Cornell", "Veach"};
int oldscene = scene;
@ -44,9 +46,9 @@ private:
void veachScene();
float colorLight[3] = {1.0f, 1.0f, 1.0f};
int ray_depth = 5;
int selected = 0;
int scene = 0;
float beta = 1.0;
};