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
This commit is contained in:
Philipp Oeser 2020-04-09 23:31:36 +02:00
parent 1a3928f33c
commit 337a7ed292
1 changed files with 1 additions and 1 deletions

View File

@ -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);