commit 3e81de4b5b8021567606bafc289f8235ef52486f
parent dcbf6aec4366ab8a1a0286034fef49eeb4362a72
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 24 Jul 2019 15:13:08 +0200
Merge branch 'release_0.6.1'
Diffstat:
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
@@ -116,6 +116,11 @@ with `<STAR3D_INSTALL_DIR>` the install directory of Star-3D and
## Release notes
+### Version 0.6.1
+
+- Fix an issue in `s3d_scene_view_sample`: the samples were not uniformaly
+ distributed if the scene contained meshes and spheres.
+
### Version 0.6
- Migrate the ray-tracing back-end from Embree2 to Embree3.
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -58,7 +58,7 @@ endif()
################################################################################
set(VERSION_MAJOR 0)
set(VERSION_MINOR 6)
-set(VERSION_PATCH 0)
+set(VERSION_PATCH 1)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
set(S3D_FILES_SRC
diff --git a/src/s3d_mesh.c b/src/s3d_mesh.c
@@ -373,7 +373,7 @@ mesh_compute_cdf(struct mesh* mesh)
if(res != RES_OK) goto error;
FOR_EACH(itri, 0, ntris) {
- area += mesh_compute_triangle_2area(mesh, itri);
+ area += mesh_compute_triangle_2area(mesh, itri) * 0.5f;
darray_float_data_get(&mesh->cdf)[itri] = area;
}
exit: