Add Heterogeneous implementation.
This commit is contained in:
parent
f702e82b4f
commit
97dbc2db13
4 changed files with 145 additions and 20 deletions
|
|
@ -13,6 +13,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 renderPixelHomogeneous(float x, float y, const ISPCCamera& camera, RayStats& stats, RandomSampler& sampler);
|
||||
Vec3fa renderPixelHeterogeneous(float x, float y, const ISPCCamera& camera, RayStats& stats, RandomSampler& sampler);
|
||||
|
||||
void drawGUI() override {
|
||||
ImGui::Checkbox("Bounding Box", &boundingBox);
|
||||
|
|
@ -23,19 +24,22 @@ private:
|
|||
ray_depth = 1;
|
||||
}
|
||||
|
||||
const char* items[] = {"Original", "Homogeneous"};
|
||||
if (ImGui::Combo("Version", &selected, items, 2))
|
||||
const char* items[] = {"Original", "Homogeneous", "Heterogeneous"};
|
||||
if (ImGui::Combo("Version", &selected, items, 3))
|
||||
clear();
|
||||
|
||||
if (ImGui::SliderFloat("mu_a", &mu_a, 0.0, 1.0))
|
||||
if (ImGui::SliderFloat("density", &density, 0.0, 1.0))
|
||||
clear();
|
||||
|
||||
if (ImGui::SliderFloat("mu_s", &mu_s, 0.0, 1.0))
|
||||
if (ImGui::SliderFloat("absorbtion", &absorbtion, 0.0, 1.0))
|
||||
clear();
|
||||
|
||||
if (ImGui::SliderFloat("scattering parameter", &scattering_parameter, -1.0, 1.0))
|
||||
clear();
|
||||
|
||||
if (ImGui::SliderFloat("temperature", &tempearture_multiplier, 1.0, 10000.0))
|
||||
clear();
|
||||
|
||||
const char* scenes[] = {"Gnome", "Horse", "Heterogenous"};
|
||||
if (ImGui::Combo("Scenes", &scene, scenes, 3)) {
|
||||
Data_Destructor(&data);
|
||||
|
|
@ -70,7 +74,8 @@ private:
|
|||
bool boundingBox = true;
|
||||
int selected = 0;
|
||||
int scene = 0;
|
||||
float mu_a = 0.0;
|
||||
float mu_s = 0.0;
|
||||
float density = 0.0;
|
||||
float absorbtion = 0.0;
|
||||
float tempearture_multiplier = 1000.0;
|
||||
float scattering_parameter = 0.4;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue