diff options
Diffstat (limited to 'servers/visual/rasterizer_rd/light_cluster_builder.cpp')
-rw-r--r-- | servers/visual/rasterizer_rd/light_cluster_builder.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/servers/visual/rasterizer_rd/light_cluster_builder.cpp b/servers/visual/rasterizer_rd/light_cluster_builder.cpp index 78011c22cc..943ef1c7fa 100644 --- a/servers/visual/rasterizer_rd/light_cluster_builder.cpp +++ b/servers/visual/rasterizer_rd/light_cluster_builder.cpp @@ -47,8 +47,8 @@ void LightClusterBuilder::bake_cluster() { float slice_depth = (z_near - z_far) / depth; - PoolVector<uint8_t>::Write cluster_dataw = cluster_data.write(); - Cell *cluster_data_ptr = (Cell *)cluster_dataw.ptr(); + uint8_t *cluster_dataw = cluster_data.ptrw(); + Cell *cluster_data_ptr = (Cell *)cluster_dataw; //clear the cluster zeromem(cluster_data_ptr, (width * height * depth * sizeof(Cell))); @@ -160,8 +160,7 @@ void LightClusterBuilder::bake_cluster() { //print_line("offset: " + itos(offset)); /* Step 3, Place item lists */ - PoolVector<uint32_t>::Write idsw = ids.write(); - uint32_t *ids_ptr = idsw.ptr(); + uint32_t *ids_ptr = ids.ptrw(); for (uint32_t i = 0; i < sort_id_count; i++) { const SortID &id = sort_ids[i]; @@ -173,12 +172,8 @@ void LightClusterBuilder::bake_cluster() { cell.item_pointers[id.item_type] = pointer | ((counter + 1) << COUNTER_SHIFT); } - cluster_dataw = PoolVector<uint8_t>::Write(); - RD::get_singleton()->texture_update(cluster_texture, 0, cluster_data, true); RD::get_singleton()->buffer_update(items_buffer, 0, offset * sizeof(uint32_t), ids_ptr, true); - - idsw = PoolVector<uint32_t>::Write(); } void LightClusterBuilder::setup(uint32_t p_width, uint32_t p_height, uint32_t p_depth) { |