From 51aa0ea58f246de76b0e9d414165a14b176ee4c7 Mon Sep 17 00:00:00 2001 From: Nikhil Shringarpurey Date: Fri, 1 May 2020 22:01:52 +0200 Subject: Fx build error with MSBuild on Windows Differential Revision: https://developer.blender.org/D7587 --- intern/ghost/intern/GHOST_WindowWin32.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'intern') diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h index 8c43eca0dc2..489d3032552 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.h +++ b/intern/ghost/intern/GHOST_WindowWin32.h @@ -35,6 +35,8 @@ # include "GHOST_ImeWin32.h" #endif +#include + #include #define PACKETDATA (PK_BUTTONS | PK_NORMAL_PRESSURE | PK_ORIENTATION | PK_CURSOR) #define PACKETMODE PK_BUTTONS -- cgit v1.2.3 From 805a78e3965b6aed4c6a94aeb469c16fd63345f3 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 30 Apr 2020 12:19:37 +0200 Subject: Cleanup: compiler warning with clang 10 --- intern/cycles/blender/blender_sync.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern') diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index f4c100bcd2b..0c120b944a7 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -108,7 +108,7 @@ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d } if (dicing_prop_changed) { - for (const pair &iter : geometry_map.key_to_scene_data()) { + for (const pair &iter : geometry_map.key_to_scene_data()) { Geometry *geom = iter.second; if (geom->type == Geometry::MESH) { Mesh *mesh = static_cast(geom); -- cgit v1.2.3 From bba11c68c40480f525a23784ebca81d98e2ec6d2 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 1 May 2020 23:42:42 +0200 Subject: Fix T75995: Cycles render artifacts with overlapping volumes This is a workaround, but a proper solution requires significant changes to ray intersection in the kernel. --- intern/cycles/render/mesh_volume.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'intern') diff --git a/intern/cycles/render/mesh_volume.cpp b/intern/cycles/render/mesh_volume.cpp index 74b8fc9e5ba..607363d01c6 100644 --- a/intern/cycles/render/mesh_volume.cpp +++ b/intern/cycles/render/mesh_volume.cpp @@ -19,6 +19,7 @@ #include "render/scene.h" #include "util/util_foreach.h" +#include "util/util_hash.h" #include "util/util_logging.h" #include "util/util_progress.h" #include "util/util_types.h" @@ -447,7 +448,14 @@ void GeometryManager::create_volume_mesh(Mesh *mesh, Progress &progress) start_point = transform_point(&itfm, start_point); cell_size = transform_direction(&itfm, cell_size); - volume_params.start_point = start_point; + /* Slightly offset vertex coordinates to avoid overlapping faces with other + * volumes or meshes. The proper solution would be to improve intersection in + * the kernel to support robust handling of multiple overlapping faces or use + * an all-hit intersection similar to shadows. */ + const float3 face_overlap_avoidance = cell_size * 0.1f * + hash_uint_to_float(hash_string(mesh->name.c_str())); + + volume_params.start_point = start_point + face_overlap_avoidance; volume_params.cell_size = cell_size; volume_params.pad_size = pad_size; -- cgit v1.2.3