You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Before: 3648 unity files Total CPU Time: 47886.140625 s Total time in Parallel executor: 498.81 seconds After: 3548 unity files Total CPU Time: 46643.828125 s Total time in Parallel executor: 486.06 seconds #jira #preflight [CL 22173263 by marc audy in ue5-main branch]
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "ARLightEstimate.h"
|
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(ARLightEstimate)
|
|
|
|
//
|
|
//
|
|
//
|
|
void UARBasicLightEstimate::SetLightEstimate(float InAmbientIntensityLumens, float InColorTemperatureKelvin)
|
|
{
|
|
AmbientIntensityLumens = InAmbientIntensityLumens;
|
|
AmbientColorTemperatureKelvin = InColorTemperatureKelvin;
|
|
AmbientColor = FLinearColor::MakeFromColorTemperature(GetAmbientColorTemperatureKelvin());
|
|
}
|
|
|
|
void UARBasicLightEstimate::SetLightEstimate(FVector InRGBScaleFactor, float InPixelIntensity)
|
|
{
|
|
// Try to convert ARCore average pixel intensity to lumen and set the color tempature to pure white.
|
|
AmbientIntensityLumens = InPixelIntensity / 0.18f * 1000;
|
|
AmbientColor = FLinearColor(InRGBScaleFactor);
|
|
|
|
// TODO: Try to convert ambient color to color tempature?
|
|
}
|
|
|
|
void UARBasicLightEstimate::SetLightEstimate(float InColorTemperatureKelvin, FLinearColor InAmbientColor)
|
|
{
|
|
AmbientColorTemperatureKelvin = InColorTemperatureKelvin;
|
|
AmbientColor = InAmbientColor;
|
|
}
|
|
|
|
float UARBasicLightEstimate::GetAmbientIntensityLumens() const
|
|
{
|
|
return AmbientIntensityLumens;
|
|
}
|
|
|
|
float UARBasicLightEstimate::GetAmbientColorTemperatureKelvin() const
|
|
{
|
|
return AmbientColorTemperatureKelvin;
|
|
}
|
|
|
|
FLinearColor UARBasicLightEstimate::GetAmbientColor() const
|
|
{
|
|
return AmbientColor;
|
|
}
|
|
|