Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 5b06ca04 authored by Laurent Belcour's avatar Laurent Belcour

Working BRDF slice data plugin

parent a2365479
......@@ -87,7 +87,7 @@ void params::to_cartesian(const double* invec, params::input intype,
break;
case params::RUSIN_TH_TD:
half_to_cartesian(invec[0], 0.0, invec[1], 0.0, outvec);
half_to_cartesian(invec[0], 0.0, invec[1], 0.5*M_PI, outvec);
break;
// 3D Parametrization
......
......@@ -50,8 +50,8 @@ vec data_brdf_slice::get(int id) const
const int i = id % width;
const int j = id / width;
res[0] = 0.5*M_PI*i / double(width);
res[1] = 0.5*M_PI*j / double(height);
res[0] = 0.5*M_PI*(i+0.5) / double(width);
res[1] = 0.5*M_PI*(j+0.5) / double(height);
res[2] = _data[3*id + 0];
res[3] = _data[3*id + 1];
......
......@@ -311,9 +311,9 @@ vec data_merl::get(int i) const
vec res(6) ;
res[2] = phid_ind * M_PI / (BRDF_SAMPLING_RES_PHI_D / 2);
res[1] = thed_ind * 0.5 * M_PI / (BRDF_SAMPLING_RES_THETA_D);
res[0] = theh_ind * 0.5 * M_PI / (BRDF_SAMPLING_RES_THETA_H);
res[2] = (phid_ind+0.5) * M_PI / (BRDF_SAMPLING_RES_PHI_D / 2);
res[1] = (thed_ind+0.5) * 0.5 * M_PI / (BRDF_SAMPLING_RES_THETA_D);
res[0] = (theh_ind+0.5) * 0.5 * M_PI / (BRDF_SAMPLING_RES_THETA_H);
res[3] = brdf[i] * RED_SCALE;
res[4] = brdf[i + BRDF_SAMPLING_RES_THETA_H*BRDF_SAMPLING_RES_THETA_D*BRDF_SAMPLING_RES_PHI_D/2] * GREEN_SCALE;
res[5] = brdf[i + BRDF_SAMPLING_RES_THETA_H*BRDF_SAMPLING_RES_THETA_D*BRDF_SAMPLING_RES_PHI_D] * BLUE_SCALE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment