|
Blender V5.3
|
Classes | |
| class | DataBuffer |
| class | Pass |
| class | PassBase |
| struct | RadiancePack |
| class | StorageCommon |
| class | SubPassVector |
| class | UniformCommon |
Functions | |
| static void | index_mask_to_ibo (const IndexMask &mask, gpu::IndexBuf &ibo) |
| BLI_INLINE float3 | pack_quaternion_4_to_3 (const float4 &q) |
| BLI_INLINE uint4 | pack_gaussian (const float3 &bounded_mean, const float3 &bounded_log_scale, bool log_scale_is_zero, const math::Quaternion &rotation, float opacity) |
| BLI_INLINE RadiancePack | pack_radiance (const Array< float3, radiance_coeffs_max > &radiance_sh) |
| static Vector< VArraySpan< float3 > > | read_radiance_sh_attributes (const bke::AttributeAccessor &attributes) |
| static void | batched_dispatch (const int invocs_count, PassSimple::Sub &pass) |
| template<typename PassT> | |
| void | compute_pass_setup (PassT &ps, const ObjectRef &ob_ref, const ResourceHandleRange &res_handle) |
| template<typename PassT> | |
| gpu::Batch * | draw_subpass_setup (PassT &sub_ps, const ObjectRef &ob_ref, const ResourceHandleRange &res_handle, GPUMaterial *gpu_material) |
|
static |
Perform batched compute dispatches to stay below GPU_max_work_group_count.
Definition at line 49 of file draw_gsplat.cc.
References batched_dispatch(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::divide_ceil_u(), DRW_GSPLAT_GROUP_SIZE, blender::GPU_max_work_group_count(), and blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
Referenced by batched_dispatch(), and compute_pass_setup().
| void blender::draw::detail::compute_pass_setup | ( | PassT & | ps, |
| const ObjectRef & | ob_ref, | ||
| const ResourceHandleRange & | res_handle ) |
Definition at line 64 of file draw_gsplat.cc.
References batched_dispatch(), compute_pass_setup(), blender::DRW_context_get(), blender::DRW_object_get_data_for_drawing(), blender::draw::GSplatEvalCache::ellipses_comp_buf_get(), blender::IndexRange::first(), blender::draw::GSplatEvalCache::get(), blender::draw::ResourceHandleRange::id_range(), blender::draw::GSplatEvalCache::infos_buf_get(), blender::draw::ObjectRef::object, blender::draw::GSplatEvalCache::radiance_comp_buf_get(), blender::draw::GSplatEvalCache::radiance_data_buf_get(), blender::draw::GSplatEvalCache::shape_data_buf_get(), blender::PointCloud::totpoint, and blender::DRWContext::viewport_size_get().
Referenced by compute_pass_setup(), and blender::draw::GSplatModule::sync_object().
| gpu::Batch * blender::draw::detail::draw_subpass_setup | ( | PassT & | sub_ps, |
| const ObjectRef & | ob_ref, | ||
| const ResourceHandleRange & | res_handle, | ||
| GPUMaterial * | gpu_material ) |
NOTE: Reusing curve attribute function.
Definition at line 89 of file draw_gsplat.cc.
References blender::BLI_assert(), blender::DRWContext::data, draw_subpass_setup(), blender::draw::drw_curves_get_attribute_sampler_name(), blender::drw_get(), blender::draw::DRW_gsplat_evaluated_attribute(), blender::DRW_object_get_data_for_drawing(), blender::draw::GSplatModule::dummy_ubo, blender::draw::GSplatModule::dummy_vbo, blender::draw::GSplatEvalCache::ellipses_comp_buf_get(), blender::draw::GSplatEvalCache::get(), blender::GPU_material_attributes(), blender::GSplat, blender::DRWData::gsplat_module, blender::draw::GSplatEvalCache::infos_buf_get(), blender::OB_POINTCLOUD, blender::draw::ObjectRef::object, blender::draw::GSplatEvalCache::radiance_comp_buf_get(), blender::draw::GSplatEvalCache::shape_data_buf_get(), STREQ, blender::draw::GSplatEvalCache::surface_get(), blender::PointCloud::totpoint, blender::Object::type, and blender::PointCloud::type.
Referenced by draw_subpass_setup(), and blender::draw::gsplat_sub_pass_setup().
|
static |
Given an IndexMask, produce a gpu::IndexBuffer holding mask indices.
Definition at line 74 of file draw_cache_impl_gsplat.cc.
References blender::data, blender::GPU_indexbuf_build_in_place_ex(), blender::GPU_indexbuf_get_data(), blender::GPU_indexbuf_init(), blender::GPU_PRIM_POINTS, and index_mask_to_ibo().
Referenced by blender::draw::GSplatEvalCache::ensure_edit_dots_indices(), and index_mask_to_ibo().
| BLI_INLINE uint4 blender::draw::detail::pack_gaussian | ( | const float3 & | bounded_mean, |
| const float3 & | bounded_log_scale, | ||
| bool | log_scale_is_zero, | ||
| const math::Quaternion & | rotation, | ||
| float | opacity ) |
Tightly pack Gaussian shape data to a uint4.
This is an adapted version of the quantization in [gspt2026], which relies on separately stored boundaries in a UBO. Our variant reduces Gaussian mean to 3x22b, scale to 3x9b, and rotation to 3x9b. We additionally pack Gaussian opacity in 8b. Across 4 uints, data is then distributed as follows:
Definition at line 114 of file draw_cache_impl_gsplat.cc.
References BLI_INLINE, blender::math::clamp(), clamp(), blender::math::normalize(), pack_gaussian(), pack_quaternion_4_to_3(), blender::math::round(), and w().
Referenced by pack_gaussian().
| BLI_INLINE float3 blender::draw::detail::pack_quaternion_4_to_3 | ( | const float4 & | q | ) |
Expmap packing [quat2017] of quaternion data.
Definition at line 89 of file draw_cache_impl_gsplat.cc.
References atan, b, BLI_INLINE, M_PI, pack_quaternion_4_to_3(), blender::sqrt(), and w().
Referenced by pack_gaussian(), and pack_quaternion_4_to_3().
| BLI_INLINE RadiancePack blender::draw::detail::pack_radiance | ( | const Array< float3, radiance_coeffs_max > & | radiance_sh | ) |
Tightly pack radiance and opacity data to 4x uint4.
This quantizes 3 channels of spherical harmonics degrees 0-3 using 8b per coefficient, so 3x16 coefficients. Note that the draw module restricts spherical harmonics to 3 degrees; packing a 4th would greatly increase memory and packing complexity for little gain.
The coefficients are distributed over 12 words as follows:
[0, 1, 2, 3] : [xyzx][yzxy][zxyz][xyzx] [4, 5, 6, 7] : [yzxy][zxyz][xyzx][yzxy] [8, 9, 10, 11] : [zxyz][xyzx][yzxy][zxyz]
Definition at line 175 of file draw_cache_impl_gsplat.cc.
References BLI_INLINE, blender::math::clamp(), pack_radiance(), blender::draw::radiance_coeffs_max, and blender::math::round().
Referenced by pack_radiance().
|
static |
Collect virtual arrays for existing pointcloud attributes that store the various spherical harmonics coefficients, up to the maximum supported number.
Definition at line 194 of file draw_cache_impl_gsplat.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::blender::Span< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), blender::draw::radiance_coeffs_max, and read_radiance_sh_attributes().
Referenced by blender::draw::GSplatEvalCache::ensure_builtin_buffers(), and read_radiance_sh_attributes().