2021-04-27 21:11:58 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "VectorTypes.h"
|
|
|
|
|
#include "Image/SpatialPhotoSet.h"
|
|
|
|
|
#include "Scene/WorldRenderCapture.h"
|
|
|
|
|
|
|
|
|
|
class UWorld;
|
|
|
|
|
class AActor;
|
2022-05-16 06:50:35 -04:00
|
|
|
struct FScopedSlowTask;
|
2021-04-27 21:11:58 -04:00
|
|
|
|
|
|
|
|
namespace UE
|
|
|
|
|
{
|
|
|
|
|
namespace Geometry
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* FSceneCapturePhotoSet creates a set of render captures for a given World and set of Actors,
|
|
|
|
|
* stored as a SpatialPhotoSet for each desired render buffer type. Currently the set of buffers are
|
|
|
|
|
* defined by ERenderCaptureType:
|
2022-07-18 11:21:15 -04:00
|
|
|
*
|
2021-04-27 21:11:58 -04:00
|
|
|
* BaseColor
|
|
|
|
|
* Roughness
|
|
|
|
|
* Metallic
|
|
|
|
|
* Specular
|
2021-05-26 03:02:11 -04:00
|
|
|
* PackedMRS (Metallic / Roughness / Specular)
|
2021-04-27 21:11:58 -04:00
|
|
|
* Emissive
|
|
|
|
|
* WorldNormal
|
2022-07-18 11:21:15 -04:00
|
|
|
* DeviceDepth
|
|
|
|
|
*
|
2021-04-27 21:11:58 -04:00
|
|
|
* There are various efficiences possible by doing these captures as a group, rather
|
|
|
|
|
* than doing each one individually.
|
|
|
|
|
*
|
|
|
|
|
* One the capture set is computed, the ComputeSample() function can be used to
|
|
|
|
|
* call SpatialPhotoSet::ComputeSample() on each photo set, ie to estimate the
|
|
|
|
|
* value of the different channels at a given 3D position/normal by raycasting
|
|
|
|
|
* against the photo set. Again, it can be more efficient to do this on the
|
|
|
|
|
* group, rather than each individually.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
class MODELINGCOMPONENTS_API FSceneCapturePhotoSet
|
|
|
|
|
{
|
|
|
|
|
public:
|
2022-07-18 11:21:15 -04:00
|
|
|
|
|
|
|
|
FSceneCapturePhotoSet();
|
|
|
|
|
|
2021-04-27 21:11:58 -04:00
|
|
|
/**
|
|
|
|
|
* Set the target World and set of Actors
|
|
|
|
|
*/
|
|
|
|
|
void SetCaptureSceneActors(UWorld* World, const TArray<AActor*>& Actors);
|
|
|
|
|
|
|
|
|
|
/**
|
2022-07-18 11:21:15 -04:00
|
|
|
* Enable/Disable a particular capture type
|
2021-04-27 21:11:58 -04:00
|
|
|
*/
|
|
|
|
|
void SetCaptureTypeEnabled(ERenderCaptureType CaptureType, bool bEnabled);
|
2022-07-18 11:21:15 -04:00
|
|
|
bool GetCaptureTypeEnabled(ERenderCaptureType CaptureType) const;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Configure the given capture type
|
|
|
|
|
*/
|
|
|
|
|
void SetCaptureConfig(ERenderCaptureType CaptureType, const FRenderCaptureConfig& Config);
|
|
|
|
|
FRenderCaptureConfig GetCaptureConfig(ERenderCaptureType CaptureType) const;
|
2021-04-27 21:11:58 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Add captures at the corners and face centers of the "view box",
|
|
|
|
|
* ie the bounding box that contains the view sphere (see AddExteriorCaptures)
|
|
|
|
|
*/
|
|
|
|
|
void AddStandardExteriorCapturesFromBoundingBox(
|
|
|
|
|
FImageDimensions PhotoDimensions,
|
|
|
|
|
double HorizontalFOVDegrees,
|
|
|
|
|
double NearPlaneDist,
|
|
|
|
|
bool bFaces,
|
|
|
|
|
bool bUpperCorners,
|
2022-06-08 23:39:09 -04:00
|
|
|
bool bLowerCorners,
|
|
|
|
|
bool bUpperEdges,
|
|
|
|
|
bool bSideEdges);
|
2021-04-27 21:11:58 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Add captures on the "view sphere", ie a sphere centered/sized such that the target actors
|
|
|
|
|
* will be fully contained inside a square image rendered from locations on the sphere, where
|
|
|
|
|
* the view direction is towards the sphere center. The Directions array defines the directions.
|
|
|
|
|
*/
|
|
|
|
|
void AddExteriorCaptures(
|
|
|
|
|
FImageDimensions PhotoDimensions,
|
|
|
|
|
double HorizontalFOVDegrees,
|
|
|
|
|
double NearPlaneDist,
|
|
|
|
|
const TArray<FVector3d>& Directions);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Post-process the various PhotoSets after capture, to reduce memory usage and sampling cost.
|
|
|
|
|
*/
|
|
|
|
|
void OptimizePhotoSets();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* FSceneSample stores a full sample of all possible channels, some
|
|
|
|
|
* values may be default-values though
|
|
|
|
|
*/
|
|
|
|
|
struct MODELINGCOMPONENTS_API FSceneSample
|
|
|
|
|
{
|
|
|
|
|
FRenderCaptureTypeFlags HaveValues; // defines which channels have non-default values
|
GeometryProcessing:
- Add FImageAdapter, wraps TImageBuilder of different types and provides a consistent interface, so that other code doesn't need specializations for each image type
- FMeshSceneAdapter now supports the ability to detect and thicken "thin" meshes, by flattening the instances into unique mesh copies (generally necessary due to scaling). Can also now return statistics about the mesh scene, return a full flattened mesh (for debugging), and automatically generate a "closing mesh" that can help to cap off the base of mesh assemblies when trying to generate a solid/etc.
ModelingComponents:
- FWorldRenderCapture now writes via FImageAdapter instead of an Image4f
- FSceneCapturePhotoSet now stores less data for photo sets. BaseColor/Emissive/WorldNormal are 3f, Roughness/Specular/Metallic are 1f
- IApproximateActors and implementation now support optional base-capping, occluded mesh removal, geometric-tolerance simplification, thin mesh auth-thickening. Now creates MICs based on an input Material, instead of new Material. Added ability to emit a flattened debug mesh, and print debug info.
MergeActors:
- Expose above improvements to IApproximateActors
#rb none
#rnx
#jira none
#preflight 609ef005f6c6e3000144c5e2
[CL 16338550 by Ryan Schmidt in ue5-main branch]
2021-05-14 21:11:51 -04:00
|
|
|
FVector3f BaseColor;
|
|
|
|
|
float Roughness;
|
|
|
|
|
float Specular;
|
|
|
|
|
float Metallic;
|
|
|
|
|
FVector3f Emissive;
|
|
|
|
|
FVector3f WorldNormal;
|
2022-07-18 11:21:15 -04:00
|
|
|
float DeviceDepth;
|
2021-04-27 21:11:58 -04:00
|
|
|
|
|
|
|
|
FSceneSample();
|
|
|
|
|
|
|
|
|
|
/** @return value for the given captured channel, or default value */
|
GeometryProcessing:
- Add FImageAdapter, wraps TImageBuilder of different types and provides a consistent interface, so that other code doesn't need specializations for each image type
- FMeshSceneAdapter now supports the ability to detect and thicken "thin" meshes, by flattening the instances into unique mesh copies (generally necessary due to scaling). Can also now return statistics about the mesh scene, return a full flattened mesh (for debugging), and automatically generate a "closing mesh" that can help to cap off the base of mesh assemblies when trying to generate a solid/etc.
ModelingComponents:
- FWorldRenderCapture now writes via FImageAdapter instead of an Image4f
- FSceneCapturePhotoSet now stores less data for photo sets. BaseColor/Emissive/WorldNormal are 3f, Roughness/Specular/Metallic are 1f
- IApproximateActors and implementation now support optional base-capping, occluded mesh removal, geometric-tolerance simplification, thin mesh auth-thickening. Now creates MICs based on an input Material, instead of new Material. Added ability to emit a flattened debug mesh, and print debug info.
MergeActors:
- Expose above improvements to IApproximateActors
#rb none
#rnx
#jira none
#preflight 609ef005f6c6e3000144c5e2
[CL 16338550 by Ryan Schmidt in ue5-main branch]
2021-05-14 21:11:51 -04:00
|
|
|
FVector3f GetValue3f(ERenderCaptureType CaptureType) const;
|
|
|
|
|
FVector4f GetValue4f(ERenderCaptureType CaptureType) const;
|
2021-04-27 21:11:58 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sample the requested SampleChannels from the available PhotoSets to determine
|
|
|
|
|
* values at the given 3D Position/Normal. This calls TSpatialPhotoSet::ComputeSample()
|
|
|
|
|
* internally, see that function for more details.
|
|
|
|
|
* @param DefaultsInResultsOut this value is passed in by caller with suitable Default values, and returned with any available computed values updated
|
|
|
|
|
*/
|
|
|
|
|
bool ComputeSample(
|
|
|
|
|
const FRenderCaptureTypeFlags& SampleChannels,
|
|
|
|
|
const FVector3d& Position,
|
|
|
|
|
const FVector3d& Normal,
|
|
|
|
|
TFunctionRef<bool(const FVector3d&, const FVector3d&)> VisibilityFunction,
|
|
|
|
|
FSceneSample& DefaultsInResultsOut) const;
|
|
|
|
|
|
2022-07-18 11:21:15 -04:00
|
|
|
/**
|
|
|
|
|
* If ValidSampleDepthThreshold > 0 then the VisibilityFunction and the DeviceDepthPhotoSet will be used to determine
|
|
|
|
|
* sample validity. Using DeviceDepthPhotoSet will mitigate artefacts caused by samples which cannot be determined
|
|
|
|
|
* invalid by querying only the VisibilityFunction.
|
|
|
|
|
* If ValidSampleDepthThreshold <= 0 only VisibilityFunction will be used to determine sample validity
|
|
|
|
|
*/
|
2022-05-16 05:13:25 -04:00
|
|
|
bool ComputeSampleLocation(
|
2022-04-25 05:41:52 -04:00
|
|
|
const FVector3d& Position,
|
|
|
|
|
const FVector3d& Normal,
|
2022-07-18 11:21:15 -04:00
|
|
|
float ValidSampleDepthThreshold,
|
2022-05-16 05:13:25 -04:00
|
|
|
TFunctionRef<bool(const FVector3d&, const FVector3d&)> VisibilityFunction,
|
|
|
|
|
int& PhotoIndex,
|
|
|
|
|
FVector2d& PhotoCoords) const;
|
2022-04-25 05:41:52 -04:00
|
|
|
|
2022-07-18 11:21:15 -04:00
|
|
|
/**
|
|
|
|
|
* @returns the value of the nearest pixel in the given photo for the given CaptureType
|
|
|
|
|
* Note: This function does not interpolate because this causes artefacts; two adjacent pixels on a photo can be
|
|
|
|
|
* from parts of the scene which are very far from each other so interpolating the values when makes no sense.
|
|
|
|
|
* Texture filtering is accomplished by the baking framework where it can use correctly localized information.
|
|
|
|
|
*/
|
2022-05-16 05:13:25 -04:00
|
|
|
template <ERenderCaptureType CaptureType>
|
2022-07-18 11:21:15 -04:00
|
|
|
FVector4f ComputeSampleNearest(
|
2022-05-16 05:13:25 -04:00
|
|
|
const int& PhotoIndex,
|
|
|
|
|
const FVector2d& PhotoCoords,
|
|
|
|
|
const FSceneSample& DefaultSample) const;
|
2021-04-27 21:11:58 -04:00
|
|
|
|
2021-05-26 03:02:11 -04:00
|
|
|
const FSpatialPhotoSet3f& GetBaseColorPhotoSet() { return BaseColorPhotoSet; }
|
|
|
|
|
const FSpatialPhotoSet1f& GetRoughnessPhotoSet() { return RoughnessPhotoSet; }
|
|
|
|
|
const FSpatialPhotoSet1f& GetSpecularPhotoSet() { return SpecularPhotoSet; }
|
|
|
|
|
const FSpatialPhotoSet1f& GetMetallicPhotoSet() { return MetallicPhotoSet; }
|
|
|
|
|
const FSpatialPhotoSet3f& GetPackedMRSPhotoSet() { return PackedMRSPhotoSet; }
|
|
|
|
|
const FSpatialPhotoSet3f& GetWorldNormalPhotoSet() { return WorldNormalPhotoSet; }
|
|
|
|
|
const FSpatialPhotoSet3f& GetEmissivePhotoSet() { return EmissivePhotoSet; }
|
2022-07-18 11:21:15 -04:00
|
|
|
const FSpatialPhotoSet1f& GetDeviceDepthPhotoSet() { return DeviceDepthPhotoSet; }
|
2021-05-26 03:02:11 -04:00
|
|
|
|
2021-05-28 02:46:59 -04:00
|
|
|
/**
|
|
|
|
|
* Enable debug image writing. All captured images will be written to <Project>/Intermediate/<FolderName>.
|
|
|
|
|
* If FolderName is not specified, "SceneCapturePhotoSet" is used by default.
|
|
|
|
|
* See FWorldRenderCapture::SetEnableWriteDebugImage() for more details
|
|
|
|
|
*/
|
|
|
|
|
void SetEnableWriteDebugImages(bool bEnable, FString FolderName = FString());
|
|
|
|
|
|
2022-06-08 23:39:09 -04:00
|
|
|
/**
|
|
|
|
|
* If enabled, any Component Scene Proxies in the level that are not meant to be included in
|
|
|
|
|
* the capture (ie not added via SetCaptureSceneActors), will be unregistered to hide them.
|
|
|
|
|
* This is generally not necessary, and disabled by default, but in some cases the Renderer
|
|
|
|
|
* may not be able to fully exclude the effects of an object via hidden/visible flags.
|
|
|
|
|
*/
|
|
|
|
|
void SetEnableVisibilityByUnregisterMode(bool bEnable);
|
|
|
|
|
|
2022-05-16 06:50:35 -04:00
|
|
|
void SetAllowCancel(bool bAllowCancelIn)
|
|
|
|
|
{
|
|
|
|
|
bAllowCancel = bAllowCancelIn;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool Cancelled() const
|
|
|
|
|
{
|
|
|
|
|
return bWasCancelled;
|
|
|
|
|
}
|
2021-05-26 03:02:11 -04:00
|
|
|
|
2021-04-27 21:11:58 -04:00
|
|
|
protected:
|
|
|
|
|
UWorld* TargetWorld = nullptr;
|
|
|
|
|
TArray<AActor*> VisibleActors;
|
|
|
|
|
|
2022-06-08 23:39:09 -04:00
|
|
|
bool bEnforceVisibilityViaUnregister = false;
|
|
|
|
|
|
2021-04-27 21:11:58 -04:00
|
|
|
bool bEnableBaseColor = true;
|
2021-05-26 03:02:11 -04:00
|
|
|
bool bEnableRoughness = false;
|
|
|
|
|
bool bEnableSpecular = false;
|
|
|
|
|
bool bEnableMetallic = false;
|
|
|
|
|
bool bEnablePackedMRS = true;
|
2021-04-27 21:11:58 -04:00
|
|
|
bool bEnableWorldNormal = true;
|
|
|
|
|
bool bEnableEmissive = true;
|
2022-07-18 11:21:15 -04:00
|
|
|
bool bEnableDeviceDepth = true;
|
2021-04-27 21:11:58 -04:00
|
|
|
|
GeometryProcessing:
- Add FImageAdapter, wraps TImageBuilder of different types and provides a consistent interface, so that other code doesn't need specializations for each image type
- FMeshSceneAdapter now supports the ability to detect and thicken "thin" meshes, by flattening the instances into unique mesh copies (generally necessary due to scaling). Can also now return statistics about the mesh scene, return a full flattened mesh (for debugging), and automatically generate a "closing mesh" that can help to cap off the base of mesh assemblies when trying to generate a solid/etc.
ModelingComponents:
- FWorldRenderCapture now writes via FImageAdapter instead of an Image4f
- FSceneCapturePhotoSet now stores less data for photo sets. BaseColor/Emissive/WorldNormal are 3f, Roughness/Specular/Metallic are 1f
- IApproximateActors and implementation now support optional base-capping, occluded mesh removal, geometric-tolerance simplification, thin mesh auth-thickening. Now creates MICs based on an input Material, instead of new Material. Added ability to emit a flattened debug mesh, and print debug info.
MergeActors:
- Expose above improvements to IApproximateActors
#rb none
#rnx
#jira none
#preflight 609ef005f6c6e3000144c5e2
[CL 16338550 by Ryan Schmidt in ue5-main branch]
2021-05-14 21:11:51 -04:00
|
|
|
FSpatialPhotoSet3f BaseColorPhotoSet;
|
|
|
|
|
FSpatialPhotoSet1f RoughnessPhotoSet;
|
|
|
|
|
FSpatialPhotoSet1f SpecularPhotoSet;
|
|
|
|
|
FSpatialPhotoSet1f MetallicPhotoSet;
|
2021-05-26 03:02:11 -04:00
|
|
|
FSpatialPhotoSet3f PackedMRSPhotoSet;
|
GeometryProcessing:
- Add FImageAdapter, wraps TImageBuilder of different types and provides a consistent interface, so that other code doesn't need specializations for each image type
- FMeshSceneAdapter now supports the ability to detect and thicken "thin" meshes, by flattening the instances into unique mesh copies (generally necessary due to scaling). Can also now return statistics about the mesh scene, return a full flattened mesh (for debugging), and automatically generate a "closing mesh" that can help to cap off the base of mesh assemblies when trying to generate a solid/etc.
ModelingComponents:
- FWorldRenderCapture now writes via FImageAdapter instead of an Image4f
- FSceneCapturePhotoSet now stores less data for photo sets. BaseColor/Emissive/WorldNormal are 3f, Roughness/Specular/Metallic are 1f
- IApproximateActors and implementation now support optional base-capping, occluded mesh removal, geometric-tolerance simplification, thin mesh auth-thickening. Now creates MICs based on an input Material, instead of new Material. Added ability to emit a flattened debug mesh, and print debug info.
MergeActors:
- Expose above improvements to IApproximateActors
#rb none
#rnx
#jira none
#preflight 609ef005f6c6e3000144c5e2
[CL 16338550 by Ryan Schmidt in ue5-main branch]
2021-05-14 21:11:51 -04:00
|
|
|
FSpatialPhotoSet3f WorldNormalPhotoSet;
|
|
|
|
|
FSpatialPhotoSet3f EmissivePhotoSet;
|
2022-07-18 11:21:15 -04:00
|
|
|
FSpatialPhotoSet1f DeviceDepthPhotoSet;
|
|
|
|
|
|
|
|
|
|
FRenderCaptureConfig BaseColorConfig;
|
|
|
|
|
FRenderCaptureConfig RoughnessConfig;
|
|
|
|
|
FRenderCaptureConfig SpecularConfig;
|
|
|
|
|
FRenderCaptureConfig MetallicConfig;
|
|
|
|
|
FRenderCaptureConfig PackedMRSConfig;
|
|
|
|
|
FRenderCaptureConfig WorldNormalConfig;
|
|
|
|
|
FRenderCaptureConfig EmissiveConfig;
|
|
|
|
|
FRenderCaptureConfig DeviceDepthConfig;
|
2021-05-28 02:46:59 -04:00
|
|
|
|
2022-06-13 10:27:34 -04:00
|
|
|
TArray<FSpatialPhotoParams> PhotoSetParams;
|
|
|
|
|
|
2021-07-14 15:27:46 -04:00
|
|
|
bool bWriteDebugImages = false;
|
2021-05-28 02:46:59 -04:00
|
|
|
FString DebugImagesFolderName = TEXT("SceneCapturePhotoSet");
|
2022-05-16 06:50:35 -04:00
|
|
|
|
|
|
|
|
bool bAllowCancel = false;
|
|
|
|
|
bool bWasCancelled = false;
|
2021-04-27 21:11:58 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2022-05-16 05:13:25 -04:00
|
|
|
template <ERenderCaptureType CaptureType>
|
2022-07-18 11:21:15 -04:00
|
|
|
FVector4f FSceneCapturePhotoSet::ComputeSampleNearest(
|
2022-05-16 05:13:25 -04:00
|
|
|
const int& PhotoIndex,
|
|
|
|
|
const FVector2d& PhotoCoords,
|
|
|
|
|
const FSceneSample& DefaultSample) const
|
|
|
|
|
{
|
|
|
|
|
if constexpr (CaptureType == ERenderCaptureType::BaseColor)
|
|
|
|
|
{
|
2022-07-18 11:21:15 -04:00
|
|
|
FVector3f BaseColor = BaseColorPhotoSet.ComputeSampleNearest(PhotoIndex, PhotoCoords, DefaultSample.BaseColor);
|
2022-05-16 05:13:25 -04:00
|
|
|
return FVector4f(BaseColor, 1.f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if constexpr (CaptureType == ERenderCaptureType::Roughness)
|
|
|
|
|
{
|
2022-07-18 11:21:15 -04:00
|
|
|
float Roughness = RoughnessPhotoSet.ComputeSampleNearest(PhotoIndex, PhotoCoords, DefaultSample.Roughness);
|
2022-05-16 05:13:25 -04:00
|
|
|
return FVector4f(Roughness, Roughness, Roughness, 1.f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if constexpr (CaptureType == ERenderCaptureType::Specular)
|
|
|
|
|
{
|
2022-07-18 11:21:15 -04:00
|
|
|
float Specular = SpecularPhotoSet.ComputeSampleNearest(PhotoIndex, PhotoCoords, DefaultSample.Specular);
|
2022-05-16 05:13:25 -04:00
|
|
|
return FVector4f(Specular, Specular, Specular, 1.f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if constexpr (CaptureType == ERenderCaptureType::Metallic)
|
|
|
|
|
{
|
2022-07-18 11:21:15 -04:00
|
|
|
float Metallic = MetallicPhotoSet.ComputeSampleNearest(PhotoIndex, PhotoCoords, DefaultSample.Metallic);
|
2022-05-16 05:13:25 -04:00
|
|
|
return FVector4f(Metallic, Metallic, Metallic, 1.f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if constexpr (CaptureType == ERenderCaptureType::CombinedMRS)
|
|
|
|
|
{
|
|
|
|
|
FVector3f MRSValue(DefaultSample.Metallic, DefaultSample.Roughness, DefaultSample.Specular);
|
2022-07-18 11:21:15 -04:00
|
|
|
MRSValue = PackedMRSPhotoSet.ComputeSampleNearest(PhotoIndex, PhotoCoords, MRSValue);
|
2022-05-16 05:13:25 -04:00
|
|
|
return FVector4f(MRSValue, 1.f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if constexpr (CaptureType == ERenderCaptureType::Emissive)
|
|
|
|
|
{
|
2022-07-18 11:21:15 -04:00
|
|
|
FVector3f Emissive = EmissivePhotoSet.ComputeSampleNearest(PhotoIndex, PhotoCoords, DefaultSample.Emissive);
|
2022-05-16 05:13:25 -04:00
|
|
|
return FVector4f(Emissive, 1.f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if constexpr (CaptureType == ERenderCaptureType::WorldNormal)
|
|
|
|
|
{
|
2022-07-18 11:21:15 -04:00
|
|
|
FVector3f WorldNormal = WorldNormalPhotoSet.ComputeSampleNearest(PhotoIndex, PhotoCoords, DefaultSample.WorldNormal);
|
2022-05-16 05:13:25 -04:00
|
|
|
return FVector4f(WorldNormal, 1.f);
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-18 11:21:15 -04:00
|
|
|
if constexpr (CaptureType == ERenderCaptureType::DeviceDepth)
|
|
|
|
|
{
|
|
|
|
|
float Depth = DeviceDepthPhotoSet.ComputeSampleNearest(PhotoIndex, PhotoCoords, DefaultSample.DeviceDepth);
|
|
|
|
|
return FVector4f(Depth, Depth, Depth, 1.f);
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-16 05:13:25 -04:00
|
|
|
ensure(false);
|
|
|
|
|
return FVector4f::Zero();
|
|
|
|
|
}
|
|
|
|
|
|
2021-04-27 21:11:58 -04:00
|
|
|
|
|
|
|
|
} // end namespace UE::Geometry
|
|
|
|
|
} // end namespace UE
|