commit b00b97104ea8e56ba54cda0e4775f6786fd361ac
parent d69927c18af24f9b01c4f4543effceaa7f9f740b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 15 Feb 2016 16:18:18 +0100
Update comments
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/sgf_estimator.c b/src/sgf_estimator.c
@@ -128,10 +128,14 @@ gebhart_radiative_path
f3_normalize(normal, attrib.value);
/* Uniformly sample the primitive to define the starting position of the
- * radiative path */
+ * radiative path.
+ *
+ * TODO the generation of canonical single precision random variables should
+ * be handled by the Star-Sampling library to ensure the uniformity of the
+ * distribution, and to avoid numerical issues leading to "out of bound"
+ * variables */
do { u = (float)ssp_rng_canonical(rng); } while(u >= 1.f);
do { v = (float)ssp_rng_canonical(rng); } while(v >= 1.f);
-
S3D(primitive_sample(&prim, u, v, st));
S3D(primitive_get_attrib(&prim, S3D_POSITION, st, &attrib));
f3_set(pos, attrib.value);
@@ -290,7 +294,6 @@ estimator_get_status
}
setup_status(acc, estimator->nsteps, status);
return RES_OK;
-
}
static void