Skip to content

Commit

Permalink
Update PIPCamera.cpp
Browse files Browse the repository at this point in the history
switch pixel format for various image types from EPixelFormat::PF_B8G8R8A8 to EPixelFormat::PF_FloatRGBA to enable compatibility with FD3D11DynamicRHI::RHIReadSurfaceFloatData
  • Loading branch information
zimmy87 committed Jan 26, 2022
1 parent 0becf91 commit 705a366
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Unreal/Plugins/AirSim/Source/PIPCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 705a366

Please sign in to comment.