From 61bbd567d4510f15cc88248a87f1798a0709af16 Mon Sep 17 00:00:00 2001 From: vesor Date: Fri, 14 Aug 2026 17:44:45 +0800 Subject: [PATCH] fix(Sensor): use point sampling for fisheye depth cubemap ## Summary - Use point sampling for the fisheye depth camera cubemap instead of linear filtering. - Prevents blended near/far depth values at cubemap face boundaries (phantom surfaces at silhouettes). - Aligns depth wide-angle lens behavior with semantic/instance segmentation cameras, which already use point sampling. # Test I didn't do much tests. I ran 4 fisheye depth camera on car in Town01 for several meters, and convert the depth image to point cloud. After this fix, the noisy flying points gone, and the point cloud looks much better. Just post the PR to let some one know this problem and provide a possible solution (without much test :( --- .../Carla/Source/Carla/Sensor/DepthCamera_WideAngleLens.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/DepthCamera_WideAngleLens.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/DepthCamera_WideAngleLens.cpp index 79026fcd784..0091d1f5b6e 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/DepthCamera_WideAngleLens.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/DepthCamera_WideAngleLens.cpp @@ -20,6 +20,11 @@ FActorDefinition ADepthCamera_WideAngleLens::GetSensorDefinition() ADepthCamera_WideAngleLens::ADepthCamera_WideAngleLens(const FObjectInitializer &ObjectInitializer) : Super(ObjectInitializer) { + // Depth is a measurement, not a colour: blending two cube faces across a + // silhouette averages the near and far hit and emits a surface that exists + // nowhere, so the cubemap has to be point sampled like the label cameras. + Super::SetCubemapSampler(CameraModelUtil::GetSampler(ESamplerFilter::SF_Point)); + AddPostProcessingMaterial( #if PLATFORM_LINUX TEXT("Material'/Carla/PostProcessingMaterials/WideAngleLens/DepthEffectMaterial_GLSL_WAL.DepthEffectMaterial_GLSL_WAL'")