update pixel format of UTextureRenderTarget2D instances #4321
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #4120
About
This PR switches the pixel format inside the UTextureRenderTarget2D for various image types from EPixelFormat::PF_B8G8R8A8 to EPixelFormat::PF_FloatRGBA to enable compatibility with FD3D11DynamicRHI::RHIReadSurfaceFloatData. There is a check inside FD3D11DynamicRHI::RHIReadSurfaceFloatData that ensures the pixel format of the inputted FRHITexture is EPixelFormat::PF_FloatRGBA.
How Has This Been Tested?
The scenario described in the repro steps of #4120 was confirmed to be working with this fix. Basic movement of a drone with a controller was tested with subwindows for each ImageType enabled to confirm each ImageType renders correctly. hello_drone.py was also run to confirm scene captures can still be taken and look correct.
Screenshots (if appropriate):