From 705a366ef4daeff8053df3f64b90786b7c9d9903 Mon Sep 17 00:00:00 2001 From: zimmy87 Date: Wed, 26 Jan 2022 04:23:06 -0800 Subject: [PATCH] Update PIPCamera.cpp switch pixel format for various image types from EPixelFormat::PF_B8G8R8A8 to EPixelFormat::PF_FloatRGBA to enable compatibility with FD3D11DynamicRHI::RHIReadSurfaceFloatData --- Unreal/Plugins/AirSim/Source/PIPCamera.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Unreal/Plugins/AirSim/Source/PIPCamera.cpp b/Unreal/Plugins/AirSim/Source/PIPCamera.cpp index 29a12cdcd9..121ffcbf58 100644 --- a/Unreal/Plugins/AirSim/Source/PIPCamera.cpp +++ b/Unreal/Plugins/AirSim/Source/PIPCamera.cpp @@ -36,16 +36,16 @@ APIPCamera::APIPCamera(const FObjectInitializer& ObjectInitializer) PrimaryActorTick.bCanEverTick = true; - image_type_to_pixel_format_map_.Add(0, EPixelFormat::PF_B8G8R8A8); + image_type_to_pixel_format_map_.Add(0, EPixelFormat::PF_FloatRGBA); image_type_to_pixel_format_map_.Add(1, EPixelFormat::PF_DepthStencil); // not used. init_auto_format is called in setupCameraFromSettings() image_type_to_pixel_format_map_.Add(2, EPixelFormat::PF_DepthStencil); // not used for same reason as above image_type_to_pixel_format_map_.Add(3, EPixelFormat::PF_DepthStencil); // not used for same reason as above image_type_to_pixel_format_map_.Add(4, EPixelFormat::PF_DepthStencil); // not used for same reason as above - image_type_to_pixel_format_map_.Add(5, EPixelFormat::PF_B8G8R8A8); - image_type_to_pixel_format_map_.Add(6, EPixelFormat::PF_B8G8R8A8); - image_type_to_pixel_format_map_.Add(7, EPixelFormat::PF_B8G8R8A8); - image_type_to_pixel_format_map_.Add(8, EPixelFormat::PF_B8G8R8A8); - image_type_to_pixel_format_map_.Add(9, EPixelFormat::PF_B8G8R8A8); + image_type_to_pixel_format_map_.Add(5, EPixelFormat::PF_FloatRGBA); + image_type_to_pixel_format_map_.Add(6, EPixelFormat::PF_FloatRGBA); + image_type_to_pixel_format_map_.Add(7, EPixelFormat::PF_FloatRGBA); + image_type_to_pixel_format_map_.Add(8, EPixelFormat::PF_FloatRGBA); + image_type_to_pixel_format_map_.Add(9, EPixelFormat::PF_FloatRGBA); object_filter_ = FObjectFilter(); }