[Bf-blender-cvs] [337a7ed2926] master: Pointclouds: fix point drawing
Philipp Oeser
noreply at git.blender.org
Fri Apr 10 08:35:09 CEST 2020
Commit: 337a7ed292638542f702f1ce2119dc73072f0b56
Author: Philipp Oeser
Date: Thu Apr 9 23:31:36 2020 +0200
Branches: master
https://developer.blender.org/rB337a7ed292638542f702f1ce2119dc73072f0b56
Pointclouds: fix point drawing
The radius component is only one float. This resulted in only a third of
intended points to draw and could lead to glitches.
Pointcloud drawing will still change a lot in the future, this is just
to be able to work on some simple tools.
Differential Revision: https://developer.blender.org/D7390
===================================================================
M source/blender/draw/intern/draw_cache_impl_pointcloud.c
===================================================================
diff --git a/source/blender/draw/intern/draw_cache_impl_pointcloud.c b/source/blender/draw/intern/draw_cache_impl_pointcloud.c
index 83757cb714a..53939b35285 100644
--- a/source/blender/draw/intern/draw_cache_impl_pointcloud.c
+++ b/source/blender/draw/intern/draw_cache_impl_pointcloud.c
@@ -134,7 +134,7 @@ static void pointcloud_batch_cache_ensure_pos(Object *ob, PointCloudBatchCache *
/* initialize vertex format */
pos_id = GPU_vertformat_attr_add(&format, "pointcloud_pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
radius_id = GPU_vertformat_attr_add(
- &format, "pointcloud_radius", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
+ &format, "pointcloud_radius", GPU_COMP_F32, 1, GPU_FETCH_FLOAT);
}
GPU_VERTBUF_DISCARD_SAFE(cache->pos);
More information about the Bf-blender-cvs
mailing list