|
Blender V5.3
|
Namespaces | |
| namespace | detail |
Classes | |
| struct | AxisTuple |
| struct | Gaussian |
| struct | Pipeline |
| struct | PointShape |
| struct | Resources |
| struct | ShapeResource |
| struct | SplatData |
| struct | SplatShape |
Functions | |
| SplatData | eval_splat (Gaussian gs, ObjectMatrices obj, ViewMatrices view, const Resources &srt) |
| template<uint Degrees> | |
| float3 | eval_radiance (Gaussian gs, ObjectMatrices obj, ViewMatrices view, const Resources &srt) |
| template float3 | eval_radiance< 1 > (Gaussian, ObjectMatrices, ViewMatrices, const Resources &) |
| template float3 | eval_radiance< 4 > (Gaussian, ObjectMatrices, ViewMatrices, const Resources &) |
| void | compute_entry (Resources &srt, const Pipeline &pipeline, const draw::View &views, const draw::Model &models, const uint3 global_id) |
| float3x3 | get_rot_scale_mat (Quaternion rotation, float3 scale) |
| float3x3 | get_covmat (Quaternion rotation, float3 scale) |
| float3 | project_gaussian (ObjectMatrices object, ViewMatrices view, Gaussian gs) |
| AxisTuple | covmat_to_axes (float3 covmat_2d_v) |
| float3 | get_planar_normal (Quaternion rotation, float3 scale) |
| float | evaluate_gaussian (float2 x_min_mu, float opacity) |
Variables | |
| PipelineCompute | compute_ellipses (compute_entry, Pipeline{.do_ellipses=true,.do_radiance=false}) |
| PipelineCompute | compute_radiance (compute_entry, Pipeline{.do_ellipses=false,.do_radiance=true}) |
| PipelineCompute | compute_ellipses_radiance (compute_entry, Pipeline{.do_ellipses=true,.do_radiance=true}) |
| void draw::gsplat::compute_entry | ( | Resources & | srt, |
| const Pipeline & | pipeline, | ||
| const draw::View & | views, | ||
| const draw::Model & | models, | ||
| const uint3 | global_id ) |
Definition at line 245 of file draw_gsplat.bsl.hh.
References compute, compute_entry(), draw::gsplat::SplatData::culled(), DRW_GSPLAT_GROUP_SIZE, eval_radiance(), eval_splat(), global_invocation_id, draw::gsplat::SplatData::is_culled(), local_size, draw::gsplat::SplatData::pack(), packHalf2x16(), resource_table, and static_branch.
Referenced by compute_entry().
Given the packed 2D covariance matrix, decompose into scaled eigenvectors, which we can use to fit a billboard rectangle shape.
Definition at line 379 of file draw_gsplat_lib.bsl.hh.
References covmat_to_axes(), draw::gsplat::AxisTuple::from(), length(), max, min, normalize, sqrt, float2::x, float3::x, float2::y, float3::y, and float3::z.
Referenced by covmat_to_axes(), and eval_splat().
| float3 draw::gsplat::eval_radiance | ( | Gaussian | gs, |
| ObjectMatrices | obj, | ||
| ViewMatrices | view, | ||
| const Resources & | srt ) |
Evaluate radiance (spherical harmonics degrees 0-3). Templated s.a. to only evaluate required degrees in different draws.
Definition at line 170 of file draw_gsplat.bsl.hh.
References eval_radiance(), spherical_harmonics::BandL0< T >::evaluate(), spherical_harmonics::BandL1< T >::evaluate(), spherical_harmonics::BandL2< T >::evaluate(), spherical_harmonics::BandL3< T >::evaluate(), draw::gsplat::Gaussian::id, max, draw::gsplat::Gaussian::mean, ObjectMatrices::model_inverse, normalize, ObjectMatrices::point_object_to_world(), resource_table, draw::gsplat::detail::scene_linear_from_bt709(), draw::gsplat::detail::slice_tuple_nxyz(), draw::gsplat::detail::slice_tuple_xnyz(), draw::gsplat::detail::slice_tuple_xynz(), draw::gsplat::detail::slice_tuple_xyzn(), transform_direction(), draw::gsplat::detail::unpack_sh(), uint4::w, ViewMatrices::world_incident_vector(), uint4::x, uint4::y, and uint4::z.
Referenced by compute_entry(), eval_radiance(), eval_radiance< 1 >(), and eval_radiance< 4 >().
| template float3 draw::gsplat::eval_radiance< 1 > | ( | Gaussian | , |
| ObjectMatrices | , | ||
| ViewMatrices | , | ||
| const Resources & | ) |
References eval_radiance(), and resource_table.
| template float3 draw::gsplat::eval_radiance< 4 > | ( | Gaussian | , |
| ObjectMatrices | , | ||
| ViewMatrices | , | ||
| const Resources & | ) |
References eval_radiance(), and resource_table.
| SplatData draw::gsplat::eval_splat | ( | Gaussian | gs, |
| ObjectMatrices | obj, | ||
| ViewMatrices | view, | ||
| const Resources & | srt ) |
Evaluate projected gsplat data, perform early culling of simple features, and return the required data for later geometry draws.
Definition at line 121 of file draw_gsplat.bsl.hh.
References any(), covmat_to_axes(), draw::gsplat::SplatData::culled(), dot(), equal, eval_splat(), get_planar_normal(), draw::gsplat::detail::is_inside_viewport(), ViewMatrices::is_perspective(), isnan, draw::gsplat::Gaussian::mean, draw::gsplat::Gaussian::opacity, ObjectMatrices::point_object_to_world(), ViewMatrices::point_world_to_ndc(), project_gaussian(), resource_table, draw::gsplat::Gaussian::rotation, draw::gsplat::Gaussian::scale, ViewMatrices::world_incident_vector(), and float3::z.
Referenced by compute_entry(), and eval_splat().
Gaussian alpha, following eq. 2 in [3dgs2023] it is multiplied by data opacity.
Definition at line 608 of file draw_gsplat_lib.bsl.hh.
References dot(), evaluate_gaussian(), exp, and saturate.
Referenced by evaluate_gaussian(), overlay::depth_only::frag(), overlay::outline_prepass::frag(), overlay::viewer_attribute::frag(), workbench::prepass::frag_opaque(), workbench::prepass::frag_transparent(), and eevee::gsplat_amend_transmittance().
| float3x3 draw::gsplat::get_covmat | ( | Quaternion | rotation, |
| float3 | scale ) |
Construct a 3x3 covariance matrix from a rotation+scaling representation.
Definition at line 290 of file draw_gsplat_lib.bsl.hh.
References get_covmat(), get_rot_scale_mat(), M, scale(), and transpose.
Referenced by get_covmat(), and project_gaussian().
| float3 draw::gsplat::get_planar_normal | ( | Quaternion | rotation, |
| float3 | scale ) |
Construct a planar normal based on an ellipsoid's shortest axis.
Definition at line 400 of file draw_gsplat_lib.bsl.hh.
References b, get_planar_normal(), norm(), quaternion_to_float3x3(), R, and scale().
Referenced by eval_splat(), and get_planar_normal().
| float3x3 draw::gsplat::get_rot_scale_mat | ( | Quaternion | rotation, |
| float3 | scale ) |
Construct a 3x3 matrix from a rotation+scaling representation.
Definition at line 280 of file draw_gsplat_lib.bsl.hh.
References from_scale(), get_rot_scale_mat(), quaternion_to_float3x3(), R, and scale().
Referenced by get_covmat(), and get_rot_scale_mat().
| float3 draw::gsplat::project_gaussian | ( | ObjectMatrices | object, |
| ViewMatrices | view, | ||
| Gaussian | gs ) |
Compute 2D covariance matrix for a projected gaussian.
Definition at line 328 of file draw_gsplat_lib.bsl.hh.
References clamp(), get_covmat(), ViewMatrices::is_perspective(), draw::gsplat::Gaussian::mean, project_gaussian(), draw::gsplat::Gaussian::rotation, draw::gsplat::Gaussian::scale, T, transform_point(), transpose, V, ViewMatrices::viewmat, W, ViewMatrices::winmat, float3::x, float3::y, and float3::z.
Referenced by eval_splat(), and project_gaussian().
| PipelineCompute draw::gsplat::compute_ellipses(compute_entry, Pipeline{.do_ellipses=true,.do_radiance=false}) | ( | compute_entry | , |
| Pipeline{.do_ellipses=true,.do_radiance=false} | ) |
| PipelineCompute draw::gsplat::compute_ellipses_radiance(compute_entry, Pipeline{.do_ellipses=true,.do_radiance=true}) | ( | compute_entry | , |
| Pipeline{.do_ellipses=true,.do_radiance=true} | ) |
| PipelineCompute draw::gsplat::compute_radiance(compute_entry, Pipeline{.do_ellipses=false,.do_radiance=true}) | ( | compute_entry | , |
| Pipeline{.do_ellipses=false,.do_radiance=true} | ) |