mosure / bevy_gaussian_splatting

bevy gaussian splatting render pipeline plugin
https://mosure.github.io/bevy_gaussian_splatting?gaussian_count=1000
MIT License
134 stars 9 forks source link

distance to gaussian cloud centroid #24

Open github-actions[bot] opened 10 months ago

github-actions[bot] commented 10 months ago

let rangefinder \= view.rangefinder3d();

.distance_translation(&mesh_instance.transforms.transform.translation),

https://api.github.com/mosure/bevy_gaussian_splatting/blob/51bdd5d4efa484d388a0fdbe1d9684c06746c418/src/render/mod.rs#L271


                let pipeline = pipelines.specialize(&pipeline_cache, &custom_pipeline, key);

                // // TODO: distance to gaussian cloud centroid
                // let rangefinder = view.rangefinder3d();

                transparent_phase.add(Transparent3d {
                    entity,
                    draw_function: draw_custom,
                    distance: 0.0,
                    // distance: rangefinder
                    //     .distance_translation(&mesh_instance.transforms.transform.translation),
                    pipeline,
                    batch_range: 0..1,
                    dynamic_offset: None,
                });
            }
        }