ImGui::Combo("",&render_state,{"OpenGL Wireframe","OpenGL Raw Color","OpenGL GBuffer","Pathtracing"});
ImGui::PopItemWidth();
ImGui::PopID();
if(renderMode()!=app::RenderMode(render_state)){
glFinish();
setRenderMode(app::RenderMode(render_state));
}
ImGui::EndGroup();
if(renderMode()==app::RenderMode::ePathtrace){
ImGui::Spacing();
ImGui::Title("Scene Settings");
ImGui::TextWrapped("By default, a transformation or mesh update will trigger a pathtracer sample count reset. If you want to limit this to explicit settings changes and camera movements, uncheck the following option.");
ImGui::ProgressBar(pathtracer().currentSample()/float(pathtracer().getMaxSamples()),ImVec2(-1,0),("Current: "+std::to_string(pathtracer().currentSample())+" of "+std::to_string(pathtracer().getMaxSamples())).c_str());
ImGui::TextWrapped("The direct clamp setting will lead to the primary ray result color being clamped down to a set maximum. That means each color component will be clamped. The same applies to the \"clamp indirect\" setting for non-primary bounces.");
ImGui::TextWrapped("The following threshold values will determine as of which accumulated PDF value the Line Space should be used instead of the BVH.");
{
floatacc=pathtracer().getAccuracyThreshold();
ImGui::DragFloat("Direct",&acc,0.001f,0.0f,1.f);
if(acc!=pathtracer().getAccuracyThreshold())
pathtracer().setAccuracyThreshold(acc);
floatshd=pathtracer().getShadowThreshold();
ImGui::DragFloat("Shadow",&shd,0.001f,0.0f,1.f);
if(shd!=pathtracer().getShadowThreshold())
pathtracer().setShadowThreshold(shd);
}
ImGui::Title("Distance Threshold");
ImGui::TextWrapped("Works like a level of detail slider. This is the maximum path length with which the BVH should be used.");
ImGui::TextWrapped("The following threshold values will determine as of which bounce the Line Space should be used instead of the BVH. This can vary for every kind of effect.");