You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#ttp 318670 - UE4: RENDERING: FORTNITE: Write HighResScreenshots to OpenEXR (ideally PSD as well) #proj Engine #branch UE4 #summary Added OpenEXR library, added OpenEXR format to ImageWrapper Module, Changed highres screenshot code to save with image wrapper. #Add OpenEXR support (for writing) to ImageWrapper module. (enabled for windows builds only) #Add added option to highres screenshot code to choose to output as hdr / openexr #Add 2 new visualisation modes, scene depth world units and custom depth world units. #add cvar 'r.BufferVisualizationDumpFramesAsHDR' to enable hdr export from console. #change FRCPassPostProcessMaterial can specify an override output texture format if required. #add SaveImage function to FHighResScreenshotConfig [CL 2252882 by Allan Bentham in Main branch]
53 lines
1.6 KiB
C++
53 lines
1.6 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#if WITH_UNREALEXR
|
|
|
|
#include "ThirdParty/openexr/Deploy/include/ImfIO.h"
|
|
#include "ThirdParty/openexr/Deploy/include/ImathBox.h"
|
|
#include "ThirdParty/openexr/Deploy/include/ImfChannelList.h"
|
|
#include "ThirdParty/openexr/Deploy/include/ImfInputFile.h"
|
|
#include "ThirdParty/openexr/Deploy/include/ImfOutputFile.h"
|
|
#include "ThirdParty/openexr/Deploy/include/ImfArray.h"
|
|
#include "ThirdParty/openexr/Deploy/include/ImfHeader.h"
|
|
#include "ThirdParty/openexr/Deploy/include/ImfStdIO.h"
|
|
#include "ThirdParty/openexr/Deploy/include/ImfChannelList.h"
|
|
|
|
/**
|
|
* OpenEXR implementation of the helper class
|
|
*/
|
|
|
|
class FExrImageWrapper
|
|
: public FImageWrapperBase
|
|
{
|
|
public:
|
|
|
|
/**
|
|
* Default Constructor.
|
|
*/
|
|
FExrImageWrapper();
|
|
|
|
public:
|
|
|
|
// Begin FImageWrapper Interface
|
|
|
|
virtual void Compress( int32 Quality ) override;
|
|
|
|
virtual void Uncompress( const ERGBFormat::Type InFormat, int32 InBitDepth ) override;
|
|
|
|
virtual bool SetCompressed( const void* InCompressedData, int32 InCompressedSize ) override;
|
|
|
|
virtual bool GetRaw( const ERGBFormat::Type InFormat, int32 InBitDepth, const TArray<uint8>*& OutRawData ) override;
|
|
|
|
// End FImageWrapper Interface
|
|
|
|
private:
|
|
template <Imf::PixelType OutputFormat, typename sourcetype>
|
|
void WriteFrameBufferChannel(Imf::FrameBuffer& ImfFrameBuffer, const char* ChannelName, const sourcetype* SrcData, TArray<uint8>& ChannelBuffer);
|
|
template <Imf::PixelType OutputFormat, typename sourcetype>
|
|
void CompressRaw(const sourcetype* SrcData, bool bIgnoreAlpha);
|
|
const char* GetRawChannelName(int ChannelIndex) const;
|
|
};
|
|
|
|
#endif // WITH_UNREALEXR
|